universal-redux-jwt
universal-redux-jwt copied to clipboard
Server and client rendering not in sync
I've done this
-
git clone https://github.com/bdefore/universal-redux-jwt.git
-
cd universal-redux-jwt
-
cp .env.example .env
-
npm install
-
npm run dev
- ctrl-c, ctrl-c
-
npm run dev
This happens when I visit the page and reload it
Chrome shows me this on the console
Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) te;background-color:blue;" data-reactid=
(server) te;background-color:red;" data-reactid="
I just realised that this only happens when you run npm run dev
and not when npm start
. What's happening?
As far as I can tell, when I'm running watch-client
the code rendered server side will pick up whatever got built by the last npm run build
- while the client side will reflect that which I'm changing in my editor.
Can you have the server side rendering "watched" too?
Is this what's discussed in https://github.com/bdefore/universal-redux/issues/37 ?
@johanforssell I cover a bit in more detail why there's currently a split between serverside rendered auth state and client rendered auth state: https://github.com/bdefore/universal-redux-jwt/issues/2#issuecomment-179904340 ... I believe the serverside implementation could be modified to match clientside renders, but haven't had a chance to look at it.
@bdefore Has this been looked into and updated? @johanforssell
I've not had any feedback here, but I'm really looking to have it fixed either. I don't mind if this issue is closed.
@johanforssell Did you mean to say you were "not" really look to have it fixed? If not, was this only a problem for dev and not production? Or you not using this kit any more?
I'm sorry that I was unclear. I am not using this piece of kit any more, so I am not interested in a solution to this specific problem now.
- Johan Forssell
On Sat, May 28, 2016 at 1:57 PM -0700, "Troy Zarger" [email protected] wrote:
@johanforssell Did you mean to say you were "not" really look to have it fixed? If not, was this only a problem for dev and not production? Or you not using this kit any more?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.