-
Notifications
You must be signed in to change notification settings - Fork 0
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-side pre-rendered images stuck at opacity: 0 #4
Comments
Well it's stuck at opacity 0 because when it is initially rendered the opacity is supposed to be 0. I'm assuming you didn't mount the component on the client side after server rendering? I'm trying to think of a way to make this work correctly when you only want to server render... |
The only fix I can think of is that you have to include the component client side, and if server rendering pass a prop, something like |
I'll see if I can come back with a solution after looking at your code. Haven't peeped it yet. |
It's really simple, I completely see the problem, just unsure of the easiest way to fix it. |
@zackify how about rendering it with |
@zackify actually, now that I thought about it, maybe you don't need |
@constb so what would be the real fix for this? |
ah, I see the ambiguity here. by |
@austinpray @constb sorry about it being 6 months later... I think I came up with an easy solution. If |
When using the react-redux-universal-hot-example repo as a starting point (https://github.com/erikras/react-redux-universal-hot-example/tree/4705688b879f853ede08e3872bc083cc84227824)
My component:
The HTML that comes through in the view source:
Notice how the opacity is frozen at 0.
How to reproduce:
npm i --save legit-image
npm start
Race condition with server-side rendering?
The text was updated successfully, but these errors were encountered: