Store categories in note.
import Immutable from 'immutable';
// import PouchDB from 'pouchdb';
import * as types from '../constants/actionTypes';
import noteRecord from '../store/noteRecord';
// const db = new PouchDB('notes');
// db.allDocs({ include_docs: true, descending: true }, function(err, doc) {
// console.log(doc.rows)
// });
export default (state = Immutable.List([]), action) => {
switch (action.type) {
case types.ADD_NOTE:
return state.push(new noteRecord(action.note));
default:
return state;
}
};