Habib Hadjar Posted April 8, 2022 Share Posted April 8, 2022 https://codesandbox.io/s/serene-cerf-6149wf?file=/src/App.tsx Hi, I'm currently learning React/Typescript/GSAP, I have this really simple animation but I actually don't know if the lag is from something that I don't understand in react or in gsap ? The thing is that it works perfectly fine when the animation is re triggered, but on load it lags. Thanky you Habib Link to comment Share on other sites More sharing options...
Solution OSUblake Posted April 8, 2022 Solution Share Posted April 8, 2022 Welcome to the forums @Habib Hadjar If you're talking about the initial animation, that's just a new feature of React 18. 😉 I would suggest either getting of strict mode, or using fromTo animations instead of from. 1 Link to comment Share on other sites More sharing options...
Habib Hadjar Posted April 8, 2022 Author Share Posted April 8, 2022 Thank you @OSUblake ! Ok I didn't know about that, since this is a really small part of a project, we could need the use of strict mode, so I just went and used fromTo and it's perfect ! Thank you again ! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now