mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
9 lines
272 B
TypeScript
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' })
|
|
};
|