Flux standard actions for Redux


1.0.03 years ago3 years agoMinified + gzip package size for @dmartss/actions in KB



Build Status codecov npm npm

Flux Standard Action utilities for Redux

Table of Contents

Getting Started


$ npm install --save redux-actions


$ yarn add redux-actions

The npm package provides a CommonJS build for use in Node.js, and with bundlers like Webpack and Browserify. It also includes an ES modules build that works well with Rollup and Webpack2's tree-shaking.

The UMD build exports a global called window.ReduxActions if you add it to your page via a <script> tag. We don’t recommend UMD builds for any serious application, as most of the libraries complementary to Redux are only available on npm.


import { createActions, handleActions, combineActions } from 'redux-actions';

const defaultState = { counter: 10 };

const { increment, decrement } = createActions({
  INCREMENT: (amount = 1) => ({ amount }),
  DECREMENT: (amount = 1) => ({ amount: -amount })

const reducer = handleActions(
    [combineActions(increment, decrement)]: (
      { payload: { amount } }
    ) => {
      return { ...state, counter: state.counter + amount };

export default reducer;


If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.