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

Store as global for server-side? #13

Closed
ntucker opened this issue Feb 20, 2016 · 3 comments
Closed

Store as global for server-side? #13

ntucker opened this issue Feb 20, 2016 · 3 comments

Comments

@ntucker
Copy link

ntucker commented Feb 20, 2016

Is it just me or is the redux store global, so every request from one use for one session will affect the initial store state sent to client for others?

@ntucker
Copy link
Author

ntucker commented Feb 20, 2016

Looks like you fixed that recently.

@ntucker ntucker closed this as completed Feb 20, 2016
@tomatau
Copy link
Owner

tomatau commented Feb 20, 2016

That was a crappy mistake by me in an initial refactor when trying to sort out middleware. But it's sorted now. I'm not sure why the fetcher wouldn't complete before it rendered the app. There's an example in BarRoute for ensuring a promise action is complete before the initial SSR too.

Regarding global stores. There's also a socketStore that gets created for handling socket broadcasts using redux-via. This store is purposefully separate as it has to stay global for all sessions. I try to just use it as a purely a broadcaster and avoid giving it any state.

@ntucker
Copy link
Author

ntucker commented Feb 21, 2016

The part of my comment about fetcher not completing I removed because I realized I had broken it by not using Promise.all() when I did multiple promises in fetcher (not returning promise means it has nothing to wait for)

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

2 participants