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