Closed zewa666 closed 5 years ago
@gins3000, you might want to give this one a look as well as a simple intro to your previously added feature.
@EisenbergEffect, should be timed together with the next minor release of the Store plugin
@gins3000, you might want to give this one a look as well as a simple intro to your previously added feature.
@zewa666, this is already looking good, I have a few suggestions:
In the first paragraph you say 'call dispatch
multiple times [...] would [...] distort your history'. Assuming you mean StateHistory
, this doesn't actually get 'fixed' with piped dispatch, as it just executes all piped actions one after another, and, as the actions themselves are responsible for modifying the history state, they will all still do so even when executed as part of a pipeline.
Instead, I would recommend to add a notice about this behavior specifically, along the lines of:
When using
StateHistory
, the history state is still updated for each individual action as if they were called separately. This leaves you fully in control of your state history. For example if you would like to merge the history transitions of piped actions into a single history transition, you could write an action that does this and append it to your pipe.
I could provide a code snippet for this, if wanted.
It could be useful to mention
action1->action2
in the Redux DevTools as well as in middleware's action.name
action.params
contains all the parameters of the piped actions in a single arrayaction.pipedActions
array, if needed.Looking forward to the release of this feature :)
Yep, a sample of what you're thinking of would be definitely helpful. Part two has been addressed with the latest commit
Explanation and sample for the piped dispatch feature