使用Mobx时,FlatList的headerView不刷新,
可以尝试用observer包裹headerView,例如:
试过,有效的,但是可能会弹出警告:
Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
网友评论