Hi,
First of all: thanks for this useful boilerplate, great to get me started!
While trying to wrap my head around everything that is going on, I noticed that upon loading one of the posts pages directly (f.ex. http://localhost:5000/post/you-smart-you-loyal), the console spits out the following warning:
Unexpected key "currentPost" found in previous state received by the reducer. Expected to find one of the known reducer keys instead: "posts". Unexpected keys will be ignored.
When I reach the page by clicking on the link on the homepage, this warning does not appear.
Is this by design? Does this boilerplate assume there is always a single point of entry?
So it's actually just a warning message. You can read more about it here: http://stackoverflow.com/questions/32968016/how-to-dynamically-load-reducers-for-code-splitting-in-a-redux-application
you mean this is a bug that could be fixed on the next releases of redux; nothing critical here ?
that is correct
馃憤
@jaredpalmer it's not just a warning, the reducer actually cleans up all the unexpected keys ...
@neekey I asked Dan about this a few months ago and he said it was in fact a warning not an error (despite being coded as an error). Feel free to submit a PR with a fix if you have time to dig deeper.
This message can appear when you do SSR and forgot to recompile the server side bundle, so it still works with the old reducers and generate the old state that createStore reads. Read more in this post.
Most helpful comment
This message can appear when you do SSR and forgot to recompile the server side bundle, so it still works with the old reducers and generate the old state that
createStorereads. Read more in this post.