| changeset 1 | 431977d7c9a6 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/reducers/notes-reducer.js Mon May 22 14:34:35 2017 +0200 @@ -0,0 +1,13 @@ +import * as types from '../actions/action-types'; +import Immutable from 'immutable'; + +const noteRecord = Immutable.Record({id:'', text: ''}); + +export default (state = Immutable.List([]), action) => { + switch (action.type) { + case types.ADD_NOTE: + return state.push(new noteRecord(action.note)); + default: + return state; + } +};