-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React 18 breaks outro animation #4
Comments
Same for me |
@fmaillet24 @chimp1nski @johnpolacek Here's my code for reference:
|
any updates on it?? the code from @thismarioperez doesn't works for me.
I'm not sure if it's a good practice, but in my case blank white looks better than flashes.. |
@chimp1nski @fmaillet24 @kadekjayak I found a way that works for me using
|
When using
React 18 (18.2.0)
, at the end of the outro animation, the transitioned timeline element flashes briefly before routing to the next page and playing the intro animation.React-18-tweenpages-bug.mov
Beware
This is not happening when using
React 17 (17.0.1)
.I've also deployed a production build as well as disabled react strict-mode in dev in order to see if it's the useEffect double firing that React 18 comes with. Although I might have overlooked something, I can rule this out for now.
Both React versions were tested with
Next.js 12.2.3
and it seems that it's not a Next issue.My guess is that there is a lack of cleanup functions in the useEffect hook and therefore weirdness happening but honestly I don't even know where to start debugging this.
I am not expecting you @johnpolacek to fix this, am just leaving this here for others that might experience the same weirdness.
Thank you so much for this awesome guide on how to implement such complex animation stuff!
If I'll find a fix for this (other than reverting to React 17) I'll update this issue and create a PR.
Cheers
The text was updated successfully, but these errors were encountered: