MCPcopy Index your code
hub / github.com/redux-utilities/redux-actions

github.com/redux-utilities/redux-actions @v3.0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.3 ↗ · + Follow
30 symbols 86 edges 42 files 0 documented · 0% 24 cross-repo links updated 1y agov3.0.0 · 2023-02-12★ 6,45942 open issues

Browse by type

Functions 30 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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 ES modules that should be compatible with every modern build tooling.

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

Core symbols most depended-on inside this repo

Shape

Function 30

Languages

TypeScript100%

Modules by API surface

src/utils/camelCase.js5 symbols
src/createActions.js5 symbols
test/handleActions.test.js3 symbols
src/combineActions.js3 symbols
test/handleAction.test.js2 symbols
src/utils/unflattenActionCreators.js2 symbols
src/utils/flattenWhenNode.js2 symbols
src/createAction.js2 symbols
test/createActions.test.js1 symbols
src/utils/ownKeys.js1 symbols
src/utils/hasGeneratorInterface.js1 symbols
src/utils/get.js1 symbols

Dependencies from manifests, versioned

@vitest/coverage-c80.26.2 · 1×
eslint-config-unicorn-camelcase0.1.1 · 1×
husky8.0.2 · 1×
just-curry-it5.3.0 · 1×
lint-staged13.1.0 · 1×
npm-run-all4.1.5 · 1×
prettier2.8.1 · 1×
reduce-reducers1.0.4 · 1×
vite4.0.3 · 1×
vitest0.26.2 · 1×
xo0.53.1 · 1×

For agents

$ claude mcp add redux-actions \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page