1.0.2 • Published 10 years ago

reflux-create-reducer v1.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

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

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago