-
Notifications
You must be signed in to change notification settings - Fork 43
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
Every list Item is rendered multiple times #121
Comments
my biglist doesn't even run to renderItem |
Hi, have you tried to use the keyExtractor prop? |
@marcocesarato yes, just added keyExtractor in Expo snack, same thing. Open the snack on your Expo iOS app and check the console logs.. without even scrolling the list you will observe that renderItem is called randomly multiple times. |
This is a view of the recycle list, so all elements of the items are recycled, the only way to update their states is the prop keyExtractor. Trying to use a console log for items is not the best way to test it (because the list calculates if the item is within the view and not at the top or bottom of the scroll and could be a little bit glitches). Anyway i need more info to test it because if I tried it on the example and for me it works all fine. |
same issue |
If we wrap the BigList component with SafeAreaProvider or using react-navigation every list Item is rendered multiple times. Please check this snack https://snack.expo.dev/@mydesweb/safeareaissue
This is bad since it is a negative performance impact.
Can anybody explain why this is happening?
The text was updated successfully, but these errors were encountered: