2.0.0 • Published 8 years ago

@meadow/redux-ensure-fsa v2.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

Redux Ensure Flux Standard Action Middleware

redux-ensure-fsa provides a middleware function to use as part of the redux dispatch chain. It is intended for use in development only to check that all actions at the end of the chain follow the Flux Standard Action protocol.

Installation

npm install @meadow/redux-ensure-fsa

Usage

import { createStore, applyMiddleware } from 'redux';
import ensureFSAMiddleware from '@meadow/redux-ensure-fsa';
import thunkMiddleware from 'redux-thunk';

let middleware = [thunkMiddleware];

if (process.env.NODE_ENV !== 'production') {
  const fsaMiddleware = ensureFSAMiddleware({
    ignore: function (action) {
      return false;
    }
  })

  middleware = [...middleware, fsaMiddleware];
}

const createStoreWithMiddleware = applyMiddleware(...middleware)(createStore);

ghit.me

2.0.0

8 years ago

2.0.0-alpha2

8 years ago

2.0.0-alpha1

8 years ago

1.1.0-alpha1

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago