Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

React Router Todo App

Now that you have seen how to perform some simple routing - it's time to refactor your Todo application!

The first thing you want to do is add React Router and set up the following RESTful routes.

  • /todos - list all of your todos
  • /todos/new - render a form to create a new todos
  • /todos/:id - list a single todo
  • /todos/:id/edit - render a form to edit an existing todo

As a bonus, when a user creates, updates or deletes a todo - they should be redirected to the /todos page. You can start reading a bit about redirects in the next section or check out the React Router docs for some hints on how to <Redirect/> (we just gave you one right there!)