redux-bomb

0.0.1 • Public • Published

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.

Package Sidebar

Install

npm i redux-bomb

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

2.65 kB

Total Files

4

Last publish

Collaborators

  • qas612820704