-
Notifications
You must be signed in to change notification settings - Fork 20
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
Server rendered views 'flash' #1
Comments
You could check in your code if the window object is present, and if it is not, disable the transition effect. To do that, you can just edit the javascript object that holds the transition styles, which is one more advantage of not dealing with a css rule. |
I did try something similar but as soon as react is picked up on the client, window/document become available so the styles are re-animated from static. Example:
I've also tried disabling it for the first initial load/refresh like so, but this stops routing working all together with no errors.
|
How about something like that :
|
This gives the same behaviour as above because.as soon as its loaded client side, the expression evaluates to true so What I need is a way for the client to not run it on initial load, which is what i've attempted by setting the If that makes sense. |
Thanks for reporting the problem, I'll look into it and let you know if I find a solution. |
@Kiee fixed it in the latest release. |
If react is rendered on the server, the page is displayed, then flashes as the initial style is set to 0 opacity, then animated back in.
Is there any way to negate this?
The text was updated successfully, but these errors were encountered: