-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Support to observe the relevant actions only #1091
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
Comments
As you can see in the shopping-cart example, you can the following reducer:
There is a lot of different actions, but you can change state only on some of them. If you get an action, which is not interesting for you, just skip it and go to Does it help for you? |
That is clear. is the reducer part of the flow. |
This is the main concept of Redux. Listeners shouldn't know about recent action. If you want to handle specific action, just rely on result of that action, not the action itself |
Did help. Thanks! :) |
Hi,
In current implementation, all the subscribers are notified when an action has been performed.
Any plans to support notification of the relevant subscribers only? The use-case would be: I would like to subscribe for the results of a particular action only. Or provide the dispatched action as a param in the subscription callback?
It may not be relevant to reactjs, but it will be useful to the other worlds.
Thanks
The text was updated successfully, but these errors were encountered: