'React Native FlatList - Useless remount when nbCols > 1

There is a performance issue on Flatlist when nbCols > 1 that remount every items. This is a reproducible example here : https://snack.expo.dev/@techskeat/flatlist-cols-rendering-issue

An issue is already opened on github since january without any solutions: https://github.com/facebook/react-native/issues/32885

Has anyone ever encountered this problem and found a work around ?

N.B: This is a not a memoization issue, the flat list in the reproducible example render memoized stateless components.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source