git ssb

1+

dinoworm ๐Ÿ› / catstack



Tree: ee357b9441a7fbb11be1a0d26b0a899624a2b155

Files: ee357b9441a7fbb11be1a0d26b0a899624a2b155 / app / reducers / todos.js

339 bytesRaw
1const initialState = require('app/state')
2
3module.exports = todos
4
5function todos (state = initialState, action) {
6 switch (action.type) {
7 case 'ADD_TODO':
8 return {
9 ...state,
10 todos: {
11 ...state.todos,
12 [action.payload.id]: action.payload
13 }
14 }
15 default:
16 return state
17 }
18}
19

Built with git-ssb-web