3.0.0 • Published 1 year ago

redux-actions v3.0.0

Weekly downloads
291,289
License
MIT
Repository
github
Last release
1 year ago

redux-actions

Build Status codecov npm npm

Flux Standard Action utilities for Redux

Table of Contents

Getting Started

Installation

$ npm install --save redux-actions

or

$ 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.

Usage

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)]: (
      state,
      { payload: { amount } }
    ) => {
      return { ...state, counter: state.counter + amount };
    }
  },
  defaultState
);

export default reducer;

See the full API documentation.

Documentation

@plone/volto@dterekhova/actions@dterekhova/reducersredux-saga-easierpatient-browserii-react-chessboard3developer-portal-librarymj_reactreact-native-itablet@otpusk/apisearch-toolboxreact-trello-sf@aliasliao/pat-commonmd-common-uiazry-redux-netredux-net2lipemat-js-boilerplate@sadorlovsky/currency-converterautoml-template@wahaaabello/react-async-actionshighstreet-studioagent-interfacejob-search-webjoshua-wepy2react-antd-enpointgraphql-playground-react-authredux-reqsreact-interactive-payment-formreact-trello-webthesoul@react_pwa/adapterpxd-react-starteroneview-guiredux-reactive-renderreacive-reduxredux-l10nhungtv12345job-frontendblindajemcf-modulemybrian-commonfaster-reduxreduxifdy2-sales-funneldocs-react-djpcs-notif-and-msgtalent-app-shellclippd-ingestioncultgearinsync-stageplayermarin-stageplayer@axa/aletheia@pyros2097/radshaman-online-meetingimiassist-agent@assessment-hrplatform/utilsmoneko.consoleweconnect-frontendlauncher_v2bc-bootbt-member-sitelumerin-wallet-ui-logicreact-redux-mirrorcra-template-pxdgrace-reduxuniqcorelive-casino-baccaratcmt-navigatoryyuap-ref-testsice-module-test@satya-imaginea/react-trelloreact-key-layersreactjs-ie8@jll-tdim-emea/okta-react-redux@jll-tdim-emea/web-uikymove-beneficiaries-frontreact-trello-not-safereact-trello-unsafezero-react@tendai.maswaya/sheshamobile-core@tendai.maswaya/sheshamobile-designerwidget_tikket@enjoytech/enjoy-integrationinv-us-smileviewtest@infinitebrahmanuniverse/nolb-redux-a@maryury/widgetdarchomniducer@everything-registry/sub-chunk-2637@shesha/reactjs-enterprisereon-test-4tic-tac-toe-enginetita-react-componentstita-talentui@bengo.co/typescript-web-starter@nebulario/tracker-dll-redux@kepler.gl/reducerstestwexpthe-store@baaz/adapter@bandwidth/redux-facet-pagination@bandwidth/redux-facet-alerts
3.0.0

1 year ago

2.6.5

5 years ago

2.6.4

5 years ago

2.6.3

5 years ago

2.6.1

6 years ago

2.6.0

6 years ago

2.5.1

6 years ago

2.5.0

6 years ago

2.4.0

6 years ago

2.3.2

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.13.0

7 years ago

0.12.0

7 years ago

0.11.0

8 years ago

0.10.1

8 years ago

0.10.0

8 years ago

0.9.1

8 years ago

0.9.0

8 years ago

0.8.0

9 years ago

0.8.0-alpha

9 years ago

0.7.0

9 years ago

0.6.0

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago