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

pass current state to subscribers #2258

Conversation

matanwerbner
Copy link

@matanwerbner matanwerbner commented Feb 22, 2017

at least in it's vanilla form - it will be usefull if store.subscribe() will have the current state as an argument, instead of needlessly calling store.getState() inside.

@markerikson
Copy link
Contributor

This has been proposed numerous times, and is not viable, primarily due to interference with batched dispatches. Please see #580 and #2214 for discussion.

@gaearon
Copy link
Contributor

gaearon commented Feb 22, 2017

I don't think it has to do with batching. Batching is problematic when we pass action. However passing state would be fine. The problem with it is that it would burden any enhancers (e.g. DevTools) with reimplementing subscriptions. This is solved by #1702 but we didn't go ahead with it, and I'm not confident about direction in #2214, so we likely won't ever fix this.

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

Successfully merging this pull request may close these issues.

3 participants