equal
deleted
inserted
replaced
1 import Immutable from 'immutable'; |
1 import Immutable from 'immutable'; |
|
2 // import PouchDB from 'pouchdb'; |
2 |
3 |
3 import * as types from '../constants/actionTypes'; |
4 import * as types from '../constants/actionTypes'; |
4 import noteRecord from '../store/noteRecord'; |
5 import noteRecord from '../store/noteRecord'; |
5 |
6 |
|
7 // const db = new PouchDB('notes'); |
|
8 |
|
9 // db.allDocs({ include_docs: true, descending: true }, function(err, doc) { |
|
10 // console.log(doc.rows) |
|
11 // }); |
6 |
12 |
7 export default (state = Immutable.List([]), action) => { |
13 export default (state = Immutable.List([]), action) => { |
8 switch (action.type) { |
14 switch (action.type) { |
9 case types.ADD_NOTE: |
15 case types.ADD_NOTE: |
10 return state.push(new noteRecord(action.note)); |
16 return state.push(new noteRecord(action.note)); |