Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rerender "renderItem" + "keyExtractor" #487

Open
phamhieu1412 opened this issue Jun 6, 2023 · 1 comment
Open

Rerender "renderItem" + "keyExtractor" #487

phamhieu1412 opened this issue Jun 6, 2023 · 1 comment

Comments

@phamhieu1412
Copy link

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
@TomCorvus
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants