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

Spring inside of Transition component is not removed until next addition/removal to the Transition #198

Closed
fernandofleury opened this issue Aug 22, 2018 · 2 comments

Comments

@fernandofleury
Copy link

Hey! I'm super excited to use react-spring. I was working with react-transition-group previously and decided to try and update my notifications system with it. Although I'm only facing a small issue:

Whenever a notification/item is removed, it will be flagged as destroyed but not removed from the DOM until another item enter or leave the Transition parent:

image

And this is unfortunately causing a small issue where there is the removed item spacing still on the DOM:

image

Anything I could do here to force some sort of update on the Transition component or is it out of the scope of the library? I've read the docs but didn't find anything related to it.

Thanks!

@drcmda
Copy link
Member

drcmda commented Aug 22, 2018

This is likely an error in react, we've had it reported here a couple of times.

#186

#136 (comment)

#153 (comment)

Could you update to at least 16.4.x and see if it persists? it had something to do with getDerivedStateFromProps, which wasn't called consistently: https://reactjs.org/blog/2018/05/23/react-v-16-4.html#bugfix-for-getderivedstatefromprops

@fernandofleury
Copy link
Author

Hey @drcmda upgrading both react/react-dom to 16.4.x did the trick indeed! 😄 thank you for your help

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