mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
adding exercise for step 7
This commit is contained in:
8
step2-07/exercise/src/actions/index.ts
Normal file
8
step2-07/exercise/src/actions/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import uuid from 'uuid/v4';
|
||||
|
||||
export const actions = {
|
||||
addTodo: (label: string) => ({ type: 'addTodo', id: uuid(), label }),
|
||||
remove: (id: string) => ({ type: 'remove', id }),
|
||||
complete: (id: string) => ({ type: 'complete', id }),
|
||||
clear: () => ({ type: 'clear' })
|
||||
};
|
||||
Reference in New Issue
Block a user