client/src/reducers/notesReducer.js
changeset 3 3b5d37d84cfe
child 12 48ddaa42b810
equal deleted inserted replaced
2:b52921a63e77 3:3b5d37d84cfe
       
     1 import Immutable from 'immutable';
       
     2 
       
     3 import * as types from '../constants/actionTypes';
       
     4 import noteRecord from '../store/noteRecord';
       
     5 
       
     6 
       
     7 export default (state = Immutable.List([]), action) => {
       
     8   switch (action.type) {
       
     9     case types.ADD_NOTE:
       
    10       return state.push(new noteRecord(action.note));
       
    11     default:
       
    12       return state;
       
    13   }
       
    14 };