{"library":"redux-sequence-action","title":"redux-sequence-action","description":"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.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install redux-sequence-action"],"cli":null},"imports":["import sequenceAction from 'redux-sequence-action'","import { applyMiddleware, createStore } from 'redux'","dispatch([A, [B, C], D, E])"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { createStore, applyMiddleware } from 'redux';\nimport sequenceAction from 'redux-sequence-action';\n\nconst reducer = (state = { count: 0 }, action) => {\n  switch (action.type) {\n    case 'INC': return { ...state, count: state.count + 1 };\n    case 'DEC': return { ...state, count: state.count - 1 };\n    default: return state;\n  }\n};\n\nconst store = createStore(reducer, applyMiddleware(sequenceAction));\n\nstore.dispatch([\n  { type: 'INC' },\n  (dispatch, getState) => {\n    console.log('After INC:', getState().count); // 1\n    dispatch({ type: 'DEC' });\n  }\n]);\n\nconsole.log(store.getState().count); // 0","lang":"javascript","description":"Demonstrates sequential dispatch: first a sync action, then a function with dispatch and getState, resulting in state changes in order.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}