DEV Community

loading...

Discussion on: How to use Conditional Rendering with Animation in React

Collapse
talorlanczyk profile image
TalOrlanczyk

You can do also onAnimationEnd to find if the animation end hide it.
Its work the same way you just need an additional state and you still can do conditinal rendering

Collapse
oussel profile image
oussel Author

Thank you ,i will code your solution and Add it to the article

Collapse
talorlanczyk profile image
TalOrlanczyk

I also prefer as O use setInterval and setTimeout make them as hooks
medium.com/javascript-in-plain-eng...
This is for a great useaTimeout

Its make stuff much more simple