Share Posted January 15 Hello, I know it can be frustrating to continuously direct people to read the documentation and look at the examples, so I want to say that I have been working on this issue for over a week. I have tried rebuilding this numerous times following the guides. Now while coding the CodePen example for this post, some of the issues I had worked! So, instead of saying, it's not doing what I want, I want to ask for some code review please. What am I trying to do? - I have an app that has various react components being added and removed. - The components have animations - I would like to do two things in terms of animations in these: - Create an animation on load and be able to navigate the timeline of tweens added within the useLayoutEffect - Add to the timeline depending on actions Review: - Is this the correct general approach to adding animations in components that appear on a SPA ? - The reverse appears to work for both the tween in the useLayoutEffect and the tween added via button click. - Playing after the reverse appears to work. - Is it correct to put the tl var in the array  for useLayoutEffect? I did this because without it, I get a warning that it should be there. CodeSandbox Example Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now