jeremybarbet/react-native-modalize

Rerender "renderItem" + "keyExtractor"

phamhieu1412 opened this issue · 1 comments

Describe the bug
Rerender "renderItem" + "keyExtractor"

Reproduce

  • i use flatlist into modalize, when use renderItem i have console.log it below:
image
  • And when scroll, console.log is running many times
Screen.Recording.2023-06-06.at.09.03.25.mov

how to fix it??

Dependencies:

  • react-native-modalize 2.1.1
  • react-native 0.70.5
  • react-native-gesture-handler 2.8.0

react-native-modalize's using react-native FlatList. There are some tips to improve it.
You can check this: https://reactnative.dev/docs/optimizing-flatlist-configuration

  • you can use Pure/Memo component to render items.