discover · compare · collections · requirements · contribute · feed · watching · stats · help with your tokens
redux-utilities/redux-actions · source
Snapshot 0 · 2026-11-04T12:47:23Z · JavaScript · MIT
Content fingerprint
0924d27940247fdddf5c4168870d9557a40b2f6f947d21a6542730ce5b92316fGitHub description at capture
Flux Standard Action utilities for Redux.
README at capture
# redux-actions
[](https://travis-ci.org/redux-utilities/redux-actions)
[](https://codecov.io/gh/redux-utilities/redux-actions)
[](https://www.npmjs.com/package/redux-actions)
[](https://www.npmjs.com/package/redux-actions)
> [Flux Standard Action](https://github.com/acdlite/flux-standard-action) utilities for Redux
### Table of Contents
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
# Getting Started
## Installation
```bash
$ npm install --save redux-actions
```
or
```bash
$ yarn add redux-actions
```
The [npm](https://www.npmjs.com) package provides [ES modules](http://jsmodules.io/) that should be compatible with every modern build tooling.
## Usage
```js
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.](https://redux-actions.js.org/)
## Documentation
- [Introduction](https://redux-actions.js.org/introduction)
- [API](https://redux-actions.js.org/api)
- [External Resources](https://redux-actions.js.org/externalresources)
- [Changelog](https://redux-actions.js.org/changelog)
- [Contributors](https://github.com/redux-utilities/redux-actions/graphs/contributors)