# reflux-create-reducer

> Quickly create a redux reducer without switch

Latest version **1.0.2** (published 2015-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install reflux-create-reducer
pnpm add reflux-create-reducer
yarn add reflux-create-reducer
bun add reflux-create-reducer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-08-17 |
| First published | 2015-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Moshe Kolodny |
| Maintainers | kolodny |
| Keywords | reflux, reducer, switch |

## Links

- npm: https://www.npmjs.com/package/reflux-create-reducer
- Repository: https://github.com/kolodny/reflux-create-reducer
- Homepage: https://github.com/kolodny/reflux-create-reducer#readme
- Issues: https://github.com/kolodny/reflux-create-reducer/issues
- npm.io page: https://npm.io/package/reflux-create-reducer

## Recent versions

- 1.0.2 (latest) — 2015-08-17
- 1.0.1 — 2015-08-17
- 1.0.0 — 2015-08-17

## README

reflux-create-reducer
===

[This code packaged as a node module](https://github.com/rackt/redux/blob/9b0630fe9ea8209777fed7cac78fee7ee76fce67/docs/recipes/ReducingBoilerplate.md#generating-reducers)

Usage:

```js
import { createReducer } from 'reflux-create-reducer';
import * as ActionTypes from '../constants/ActionTypes';

const initialState = [];


export const todos = createReducer(initialState, {
  [ActionTypes.ADD_TODO](state, action) {
    let text = action.text.trim();
    return [...state, text];
  }
})
```

---
_Source: https://npm.io/package/reflux-create-reducer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
