-
Notifications
You must be signed in to change notification settings - Fork 27k
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
with-redux-wrapper example bug #17299
with-redux-wrapper example bug #17299
Comments
Hi, I found the problem here: https://github.com/vercel/next.js/blob/canary/examples/with-redux-wrapper/store/store.js#L26 if (state.count.count) nextState.count.count = state.count.count // preserve count value on client side navigation Since the first "count" key refers to the count reducer, and the second "count" key is the actual value defined in Since it's a small change I decided to go ahead and opened a PR: #17335 😄 |
…7299) Wrong variable was being checked for the hydrate action on redux. This was causing the count to be reset to 0 instead of being 1 when initially loading index.js page.
@Pitasi I try it, It work! very thank you |
…7299) (vercel#17335) Wrong variable was being checked for the hydrate action on redux. This was causing the count to be reset to 0 instead of being 1 when initially loading index.js page. Fixes vercel#17299
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
In with-redux-wrapper example index.js page has a code:
the reducer.js
in getStaticProps code has
store.dispatch(addCount())
so when I run the index.js page the page count must be 1 but is 0 is bug?
The text was updated successfully, but these errors were encountered: