Hernanbp Posted May 5, 2022 Share Posted May 5, 2022 So I'm new to gsap just started last night , and I did an animation and it works great when I run the server, but when I deploy on vercel it doesnt work anymore, any idea why this could be happening? , It works partially but not the same as in development, the stagger doesn't work properly and sometimes things just pop in the screen without animation. I'm using NextJs Link to comment Share on other sites More sharing options...
OSUblake Posted May 5, 2022 Share Posted May 5, 2022 Welcome to the forums @Hernanbp It's very hard to answer a question like this without a minimal demo. You can use CodeSandbox if you need to use next. Thanks! Link to comment Share on other sites More sharing options...
Hernanbp Posted May 5, 2022 Author Share Posted May 5, 2022 3 hours ago, OSUblake said: Welcome to the forums @Hernanbp It's very hard to answer a question like this without a minimal demo. You can use CodeSandbox if you need to use next. Thanks! https://codesandbox.io/s/friendly-brahmagupta-kek36e?file=/src/App.js this is what happens, the stagger doesn't work EDIT: I found the problem , I should have used the fromTo method. Link to comment Share on other sites More sharing options...
OSUblake Posted May 5, 2022 Share Posted May 5, 2022 It runs fine on CodeSandbox for me. Am I missing something? If you're using React 18, maybe the issue is related to this. If not handled properly, your from animations might end up creating a from logic issue. I would also make sure that your effect has a dependency array and you kill of any animations you created in it. See the Cleaning Up part of our React Guide for more information about that. 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