You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem, when refresh the browser, getInitialProps fetch data and dispatch an action ,then the server will return a correct page, but when the client loads all js file, redux state has become the initial value.
warning.js?9dca99b:35 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) h1 data-reactid="3"></h1><h3 data-reacti
(server) h1 data-reactid="3">TJ Holowaychuk</h1><
The text was updated successfully, but these errors were encountered:
@kirill-konshin this statement "initialState has to be used from function params - Otherwise same state will always be applied and server-propagated state will be lost."
was the key to fixing my problem with page child components resetting the state. Might be useful to others to add that as a comment in your readme example...
thanks for your awesome library.
I have a problem, when refresh the browser, getInitialProps fetch data and dispatch an action ,then the server will return a correct page, but when the client loads all js file, redux state has become the initial value.
demo repository https://github.com/joyran/next.js-with-redux-demo
console log
The text was updated successfully, but these errors were encountered: