redux-array-middleware

1.0.1 • Public • Published

redux-array-middleware

This middleware allows you to dispatch array of actions to a redux store

Installation

npm i redux-array-middleware
 
# or 
 
yarn add redux-array-middleware

Usage

import arrayMiddleware from 'redux-array-middleware';
import { applyMiddleware, createStore } from 'redux';
import reducer from './reducer';
 
const store = createStore(reducer, {}, applyMiddleware(arrayMiddleware));
 
// ... dispatch
 
store.dispatch([
  { type: 'action1' },
  { type: 'action2', payload: 'sample action' },
  [
    { type: 'nested_array' },
    [
      { type: 'deeply_nested_array_is_supported' },
      [{ type: 'any', payload: 'level' }],
    ],
    [
      // even empty array too
    ],
  ],
]);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i redux-array-middleware

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • tungv