Files
frontend-bootcamp/step2-06/src/actions/index.ts
2019-02-18 11:48:34 -08:00

9 lines
272 B
TypeScript

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' })
};