Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Store.subscribe vs Actions firing actions #597
Let's say that a completed async operation should fire another action based on new data. While I would prefer to do this with Store.subscribe, I think the "listener" is to raw, given that I might end up observing state diff in multiple actions ("files"), which is wasteful. On that note, it'd be kinda useful if store.subscribe would fire with an argument containing the diff in state calculated in a single place.
My question here is again about the healthy pattern usage. Do you folks think it's viable to import an action and fire it from another action? Example below:
In this case