-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Last FlatList item component re-mounted when adding new elements at the beginning of the list #44756
Comments
@cortinico Any update on this ? |
Nope no updates. We're hyperfocused on fixing New Architecture bugs at the moment, so unless this is a New Architecture specific bug, we won't be able to fix it in the immediate future |
@cortinico This is happening in both new arch and old . |
Yup but is not New Architecture specific (i.e. is not a regression) |
@cortinico anyways i started debugging.
This check is not needed in my opinion , but currently i am not sure of its impact . If you could help me guiding in right direction that would be of great help |
@exploIF can you try this out . |
Description
Each time a new component is added at the beginning or in the middle of the list, the last component (the one that was added first) re-mounts. I've noticed that when a new component is added to the list, a spacer component is created and it always replaces last component in that list, even if new components are added at the beginning or in the middle of the list. This makes last item to completely re-mount. This problem only occurs when the
initialNumToRender
is exceeded.Steps to reproduce
add
button multiple times (at least 4).initialNumToRender
last item is unmounted.React Native Version
0.74.1
Affected Platforms
Runtime - Android, Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@exploifswm/flat-list-item-re-mount
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: