JSPM

redux-bomb

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q9430F
  • License MIT

Bomb middleware for Redux.

Package Exports

  • redux-bomb

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (redux-bomb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Redux Bomb

This is a useless middleware.

This middleware will fork 2 more actions when every dispatching.

Get Started

import { createStore, applyMiddleware } from 'redux';
import bomb from '../src';

const counter = (state = 0, action) => {
  if (action.type === 'INCREMENT') return state + 1;

  return state;
};

const store = createStore(counter, applyMiddleware(bomb));

store.subscribe(() => console.log(store.getState()));

store.dispatch({ type: 'INCREMENT' });

/*
  A beautiful flushing screen
*/

Demo

with-delay

It can set delay in milesecond.

  applyMiddleware(bomb.delay(1000));

That it.

DO NOT USE IT.