Socket
Book a DemoInstallSign in
Socket

redux-action-enhancer-middleware

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-action-enhancer-middleware

Middleware that provides an enhancing function to dispatched actions, with optional filtering to target only certain actions.

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
7
133.33%
Maintainers
1
Weekly downloads
 
Created
Source

redux-action-enhancer-middleware

Middleware that provides an enhancing function to dispatched actions, with optional filtering to target only certain actions.

Install

npm i -S redux-action-enhancer-middleware

Example

import actionEnhancerMiddleware from 'redux-action-enhancer-middleware';

const options = {
  filter: (action) => true,
  enhancer: (dispatch, getState, action) => {...action}
};

const store = createStore(
  reducer,
  applyMiddleware(
    actionEnhancerMiddleware(options)
  )
);

API

redux-action-enhancer-middleware takes an options object with an optional filter and a required enhancer.

Filter

(action) => true

Function that receive an action and returns a boolean that determines if the enhancer should be invoked.

Enhancer

(dispatch, getState, action) => nextAction

Function that receives a dispatch, getState, and action. The enhancer returns an action.

Keywords

redux

FAQs

Package last updated on 19 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.