Files: b817a22329dc2038d6896282542635e15961b37b / app / todos / reducer.js
234 bytesRaw
1 | module.exports = todos |
2 | |
3 | function todos (state = {}, action) { |
4 | switch (action.type) { |
5 | case 'CREATE_TODO': |
6 | return { |
7 | ...state, |
8 | [action.payload.id]: action.payload |
9 | } |
10 | default: |
11 | return state |
12 | } |
13 | } |
14 |
Built with git-ssb-web