-
Notifications
You must be signed in to change notification settings - Fork 257
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
Conditionally animating results in stale DOM #224
Comments
DOM cleanup is still somewhat sketchy and kind of lacking in test coverage. if you could provide an example, that would be very helpful, as it would provide something to develop against 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I conditionally set enterAnimation/leaveAnimation to false on the FlipMove element. During the same render cycle the children of the FlipMove component are updated as well. This results in the DOM containing extra elements, and another render cycle needs to be initiated before FlipMove removes the extraneous elements from the DOM.
For a simplified example of what's happening imagine a connected component that gets the list elements and a shouldAnimate boolean.
<FlipMove enterAnimation={shouldAnimate} leaveAnimation={shouldAnimate}>{items}</FlipMove>
I can provide a more complete example if necessary, but I'm mainly wondering if this is expected behavior or if this has happened to anyone else.
The text was updated successfully, but these errors were encountered: