redux-async-connect icon indicating copy to clipboard operation
redux-async-connect copied to clipboard

Server-side React render was discarded

Open shawnxusy opened this issue 9 years ago • 4 comments

Followed the setup and changed my existing code, got this error in console: Server-side React render was discarded. Make sure that your initial render does not contain any client-side code.

It seems dest.firstChild.attributes['data-react-checksum'] is undefined, and I guess somewhere there is a mismatch between server / client rendering.

(I'm also using webpack isomorphic tools, i.e., <Provider store={store} key="provider" assets={webpackIsomorphicTools.assets()}>)

Great work btw, this is definitely the cleanest approach to async loading!

shawnxusy avatar Mar 09 '16 03:03 shawnxusy

Experiencing the same issue here as well - undefined dest.firstChild.attributes['data-react-checksum']

babsonmatt avatar Mar 09 '16 21:03 babsonmatt

rc3 works no problem

babsonmatt avatar Mar 09 '16 21:03 babsonmatt

For now I switched back to the fetchComponentDataBeforeRender approach (as in https://github.com/choonkending/react-webpack-node, app/api/fetch...). It's not as elegant as redux-async-connect, but works and I get to see what happens under the hood.

shawnxusy avatar Mar 10 '16 00:03 shawnxusy

Any plan on fixing this issue soon?

ioanlucut avatar Apr 03 '17 17:04 ioanlucut