React Routes Practice 2

Instructions

  • In App.js, add a route for “products/:id/edit”
  • In ProductsPage.js add an “Edit” link for each product
  • In EditProduct.js use the location object to access the product data and populate the form

Extension 1

  • In the handleSubmit method in EditProduct.js, update the products list with the edited product.