FlatList re-mount all the row when using columns #45895
Labels
Component: FlatList
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Newer Patch Available
Description
Regardless of the use of optimization techniques, such as React.memo or useCallback, when a FlatList with columns (numColumns > 1) is created and an element is added or removed from the list, this causes all components of the row where the element was added or removed to be re-mounted. This is easily noticeable if entry animations are used (but it has other serious repercussions). I'm currently stuck in development on this issue (and switching to unsare scroll view would make the app unusable). There are many similar issues by now, all closed without any discussion or solution, and since it has been years now I think it is time to take the problem into consideration.
Steps to reproduce
React Native Version
0.74.3
Affected Platforms
Runtime - Android, Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@niccolocase/0aa680
Screenshots and Videos
Registrazione.schermo.2024-08-05.alle.14.45.06.mov
The text was updated successfully, but these errors were encountered: