JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6138
  • Score
    100M100P100Q131187F
  • License MIT

Publishing createReducer from http://rackt.github.io/redux/docs/recipes/ReducingBoilerplate.html

Package Exports

  • redux-create-reducer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (redux-create-reducer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

redux-create-reducer

NPM version Build status Test coverage Downloads

This code packaged as a node module

Usage:

import { createReducer } from 'redux-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];
  }
})