Skip to content
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

Should not cache store on server side #6

Open
nwshane opened this issue Jul 26, 2017 · 0 comments
Open

Should not cache store on server side #6

nwshane opened this issue Jul 26, 2017 · 0 comments

Comments

@nwshane
Copy link

nwshane commented Jul 26, 2017

This module currently caches the redux store on the server side, which is illogical and caused a bug in my app that was hard to track down. Caching on the client side makes sense - the redux store should only be created on the initial app load, rather than on each separate page load. However, caching on the server side means that the first request to the server will create a new redux store, and then the server will reuse that same store for every subsequent request.

The module next-redux-wrapper caches on the client and not on the server, so I've switched to that for now. If there is some strong reason for caching on the server that I haven't realized, then it should at least be documented clearly in the README.

lesbaa added a commit to lesbaa/next-connect-redux that referenced this issue Feb 2, 2018
We encountered the same bug mentioned in issue huzidaha#6.  Testing is server and creating a new store if it is the server makes sense.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant