Add way to map actions to multiple reducers
This was brought up in a discussion on reddit. Right now typeful-redux does not offer the possibility to react in multiple reducers to a dispatched action. This is indeed a bit of a limitation.
Perhaps a third argument to the reducer function for options, one of which can relay to take the action type as is.
('clear', s => [])
could be written as
('someOtherStore/someActionType', s => {...}, { preserveActionType: true })
Which would then just take the action type as is instead of concatenating it with the given store. It's possible more options may be useful in the future, and this doesn't really change the normal flow of the current api at all.
@jaredpetker I've opend up a new issue #3 for this as I think it is a slightly different topic from the problem this issue addresses.
Can you describe your use case for this? I'm not sure I fully understand the end goal of this yet.
(Let's please move this discussion to issue #3).
Yea, indeed, my initial thought does not handle this at all (don't know what I was thinking looking back at it). I don't have a separate use case at the moment other than what this issue presents. Will ponder this some more as being able to handle actions dispatched from other stores is something I would need for our use case as well (even if only used very sparingly).