DEV Community

Discussion on: Animation Classes & useEffect Hooks - Is There a Better Way?

Collapse
 
avatarkaleb profile image
Kaleb M

Hi there,

Thanks for commenting!

Would React Spring be necessary for basic animations or worth including into the bundle? I've heard of it and looks great!

I created a code pen to demo the solution:

codepen.io/avatar-kaleb/pen/voBmzp -- if you want to see the issue, comment out the useEffect hook and you will see that it fades out, then comes right back into view!

Would React Spring help remove this issue without using the hook / setTimeout