Skip to content

dispatch should call all listener functions with the action object as argument #2348

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

Closed
praburajan opened this issue Apr 9, 2017 · 1 comment

Comments

@praburajan
Copy link

Do you want to request a feature or report a bug?
feature
(If this is a usage question, please do not post it here—post it on Stack Overflow instead. If this is not a “feature” or a “bug”, or the phrase “How do I...?” applies, then it's probably a usage question.)

What is the current behavior?
The store.dispatch calls all listener functions. Sometimes, especially in frameworks other than react, we need the context of the action to react to changes in state in different ways. For example, when I am using redux in knockout js, I would like to know the action that was dispatched to update only specific observables that are needed. If this feature is not there, then I have to update all observables reading the latest state from the store and that is a costly operation

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.

Its not a bug, its the intended behaviour and is probably suitable for react, but sometimes not enough for other frameworks to be used with redux

What is the expected behavior?

store.dispatch should call all listeners passing the action that was originally dispatched

Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?

This is a new feature request

@markerikson
Copy link
Contributor

This has been requested many times, and is not planned. Please see prior discussions linked from #580 .

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