client/src/reducers/notesReducer.js
author ymh <ymh.work@gmail.com>
Thu, 22 Jun 2017 12:53:00 +0200
changeset 77 cd27d9fc1c73
parent 66 f402435be429
child 79 772b73e31069
permissions -rw-r--r--
some linting

import Immutable from 'immutable';
import * as types from '../constants/actionTypes';
import NoteRecord from '../store/noteRecord';

export default (state = Immutable.List([]), action) => {
  switch (action.type) {
    case types.ADD_NOTE:
      return state.push(new NoteRecord(action.note));
    default:
      return state;
  }
};