From the course: Building React and ASP.NET Core Applications

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Challenge: Updating data from React

Challenge: Updating data from React

From the course: Building React and ASP.NET Core Applications

Start my 1-month free trial

Challenge: Updating data from React

(upbeat music) - [Instructor] We learned how to add a new trip to the existing trips list. Now, it's time for you to try to implement the update trip feature. It's the same as the create feature, but here, you just need to load the trip details. For that, you can use the component DidMount Lifecycle method to get the details. You just need to send a get request with the trip ID as a parameter and then set the response to the state of the component. To get the ID, you can use the props.match.params which you can see in here. Give it a try and make sure that you check how I solved it.

Contents