-
Notifications
You must be signed in to change notification settings - Fork 115
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
Read initial state from server #32
Comments
@stoope We don't overwrite any state intentionally, I will try it out and see if I can get a repro. |
@navneet-g Have made playground https://codesandbox.io/s/k917m5ppjv. If you remove |
Awesome ... thanks for doing it @stoope ... I will take a look tonight or over the weekend. |
@stoope I took a look, this is happening as the keys in initialState are ignored by combinedReducer, as the defaultModule does not contain any reducers for those keys. If the defaultModule can contain the Notice line 163 onwards in following file in redux code. I have modified the playground to illustrate it Please let me know if you have any question. |
@navneet-g Thanks, I see... This is a problem since I don't know about other reducers at initial stage, they will be added later with react-loadable. Best solution is to read |
Yes ... That is an alternative, I don't know though, when does the library overwrites the state in window object. |
Closing as hopefully the above answered the question, please reopen if you still need help with this. |
I want to pass preloaded state from server
(https://redux.js.org/recipes/serverrendering#client-js)
Problem is initial state passed to createStore overwrites by initial state from each dynamically loaded reducer. How can I apply preloaded state to them?
The text was updated successfully, but these errors were encountered: