reflux-create-reducer

1.0.2 • Public • Published

reflux-create-reducer

This code packaged as a node module

Usage:

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];
  }
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i reflux-create-reducer

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • kolodny