Repository navigation
FlatList More complex, multi-select example #1529
Description
Activity
I believe there is a mistake in this example. The documentation of FlatList states that:
This is a PureComponent which means that it will not re-render if props remain shallow-equal. Make sure that everything your renderItem function depends on is passed as a prop (e.g. extraData) that is not === after updates, otherwise your UI may not update on changes. This includes the data prop and parent component state.
The problem is that the
renderItemprop is passed as an inline function, thus the section list will rerender in every App's rerender. Therefore, the extraData parameter is useless in this example. The documentation should show another example of how to use the extraData prop correctly.Also, can you reword this phrase ?
Make sure that everything your renderItem function depends on is passed as a prop (e.g. extraData) that is not === after updates, otherwise your UI may not update on changes.
Seems grammatically incorrect (which is the verb, "is" or "updates" ?).
👋 Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
- addedStaleIssues/PR that are not getting much activity and are closer to be closedIssues/PR that are not getting much activity and are closer to be closed
on Aug 16, 2020 @Stale This should remain open
- removedStaleIssues/PR that are not getting much activity and are closer to be closedIssues/PR that are not getting much activity and are closer to be closed
on Aug 16, 2020 👋 Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
- addedStaleIssues/PR that are not getting much activity and are closer to be closedIssues/PR that are not getting much activity and are closer to be closed
on Dec 25, 2020 Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
The example provided in the FlatList article is supposed to rerender the FlatList only when passing extraData prop. However, the FlatList rerenders on IOS and Android whether extraData prop is passed or not. The strange thing is that the example works fine on web.