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

Fix stable id collisions and provide alternate for optimiseForInsertDeleteAnimations #696

Merged
merged 5 commits into from
Mar 21, 2022

Conversation

naqvitalha
Copy link
Collaborator

@naqvitalha naqvitalha commented Mar 12, 2022

What

Fixes:

  • Stable Id implementation had a bug where sometimes repeat keys would be allocated to some items because the map tracking these allocations was not getting updated.
  • optimiseForInsertAndDeleteAnimations wasn't really serving any purpose because even with it turned on insert animations were broken as you'd see items flying from the recycle pool and similarly for delete animations things would fly out to be reused. This props is a no op now and deprecated in favour of prepareForLayoutAnimationRender api that needs to be called along with LayoutAnimation.configureNext

@fortmarek fortmarek mentioned this pull request Mar 15, 2022
1 task
@naqvitalha naqvitalha changed the title Animation stable id fix Fix stable id collisions and provide alternate for optimiseForInsertDeleteAnimations Mar 17, 2022
@naqvitalha
Copy link
Collaborator Author

@muskeinsingh Please help review this

@naqvitalha naqvitalha merged commit 3f9a4f4 into master Mar 21, 2022
@naqvitalha naqvitalha deleted the animationStableIdFix branch March 21, 2022 17:40
@ed1son67
Copy link

ed1son67 commented Sep 7, 2022

How can I use the new feature prepareForLayoutAnimationRender?

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

Successfully merging this pull request may close these issues.

2 participants