added demo code to step 5

This commit is contained in:
Ken
2019-03-02 21:44:19 -08:00
parent 15bee6892b
commit 1f4baa2ca4
13 changed files with 128 additions and 154 deletions

View File

@@ -0,0 +1,9 @@
import nextId from 'uuid/v4';
export const actions = {
addTodo: (label: string) => ({ type: 'addTodo', id: nextId(), label }),
remove: (id: string) => ({ type: 'remove', id }),
complete: (id: string) => ({ type: 'complete', id }),
clear: () => ({ type: 'clear' }),
setFilter: (filter: string) => ({ type: 'setFilter', filter })
};