-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
problem with module caching when used in _app and other pages #4447
Comments
Please refer to redux-act readme:
so using uppercase description will solve your issue, see the following
This is an issue with how redux-act is designed, not nextjs |
Duplicate of #4194 |
@timneutkens will follow there thanks. |
Describe the bug
I am having a problem when using packages that have module caching and keep track of internal state in server rendering. An example of such packages is redux-act where module caching is used to keep track of an id used to serialize action types. The bug happens when importing my
store.js
file with all the actions, reducers and the store in_app
, and importing it in other pages as well. This causes mystore.js
file to be bundled with both_app
and any other page I am rendering likeindex
. This causes thecreateAction
to be called twice to the same action which causes the internalredux-act
ids to be out of sync and thus the reducer never handles the add actionTo Reproduce
this reproduce code is passed on the
with-redux-wrapper
example.npm run dev
Expected behavior
the
AddCount
should be 1 because anadd
action was dispatched ingetInitialProps
System information
Additional context
what I did in the example is I just added
redux-act
and replaced the actions withredux-act
actions and deleted the thunkAddCount action
.The text was updated successfully, but these errors were encountered: