-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
Redux over the wire? #211
Comments
As I understood from middleware docs it is pretty easy to intercept and even redirect actions. So in this scheme direction from Component to Store Producer is manageable so I can log actions to some other context for example.
But is that possible to intercept store changes in the same way? |
I am looking for such configuration: client reponsibility: server reponsibility: As I comprehend redux API only action generation is interceptable for now. |
Figured out solution, thanks to @raydeo. To consume store changes I need to create special store-reducer that set new state on some action, and middleware allows to intercept and generate actions. |
Here is implemention of this approach and demo |
Let's continue this discussion in #313. |
This is a great way of using flux on mobile, with web workers or whatever - splitting it on the client and server.
Could this be done in redux? This seems to me more magical as redux has stateless stores. Typically the simplest solution of this is to keep state in stores and stream stores changes to components which are located in other context.
The text was updated successfully, but these errors were encountered: