A Redux middleware that enables sequential dispatch of actions using arrays and nested arrays, providing a declarative syntax for ordered action execution. Version 0.2.1, stable but unmaintained since 2016. It simplifies dispatching sequences like A → [B, C] → D → E without needing thunk or promise middleware. Differentiates from redux-saga or redux-observable by being a lightweight, pure middleware approach with no additional dependencies.
npm install redux-sequence-actionVerified import paths — ran on the pinned version, not inferred.
Demonstrates sequential dispatch: first a sync action, then a function with dispatch and getState, resulting in state changes in order.
Ensure action creators return arrays or define a fallback for single actions.
Consider using redux-thunk with promise chains or redux-saga for sequence control.
Use Promise.all or a different middleware like redux-promise for true parallel dispatch.
Ensure sequenceAction is the last middleware in applyMiddleware chain to avoid middleware skipping.
Add sequenceAction to applyMiddleware: applyMiddleware(sequenceAction).
Ensure the outer dispatch is from a store that has sequenceAction middleware, and use the pattern dispatch([...]).
Check all elements in the array returned by action creator to ensure they are valid actions or thunks.
No dependency data recorded yet.