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

Forward redux events to remote stores #247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zshannon
Copy link

Hey folks, thanks for a great package! I ran into the same issue as a couple other people where I wasn't getting actions to trigger my side-effects on my remote stores. I added a redux middleware to the background store in wrapStore that drops every action into the message bus for the remote stores and re-dispatches them on the remote so they can get picked up by side-effects.

NB: I didn't think carefully about the ordering of messages here because it doesn't matter for my use case, but would probably be a good idea if you've got the time to think about when the actions and state patches arrive at the remote ;)

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.

1 participant