Home

Awesome

Redux Notify

Redux middleware to notify when an action from the list is dispatched.

Demo

Usage

Specify actions to catch, and which actions to trigger:

const notifyEvents = [
  {
    catch: [INCREMENT_COUNTER, DECREMENT_COUNTER],
    dispatch: sendNotification
  }
];

Then just include it as a redux middleware:

import notify from 'redux-notify';
const store = applyMiddleware(notify(notifyEvents))(createStore)(reducer);

API

notify(notifyEvents, [config])

Examples