Actions

Our app accepts the following five actions:

  • FETCH_TODOS: To fetch a new list of todo items—{ type: 'FETCH_TODOS', todos: [] }
  • ADD_TODO: To insert a new todo item—{ type: 'ADD_TODO', title: 'Test ToDo app' }
  • TOGGLE_TODO: To toggle the completed value of a todo item—{ type: 'TOGGLE_TODO', id: 'xxx' }
  • REMOVE_TODO: To remove a todo item—{ type: 'REMOVE_TODO', id: 'xxx' }
  • FILTER_TODOS: To filter todo items—{ type: 'FILTER_TODOS', filter: 'completed' }
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.184.90