Now that you have the view set up, learn how to send a post request to your create API endpoint to store the data.
- (Narrator) We created the form for adding new trips. … Now let us see how to get the form data … and send a request to the web API. … For that, let's go to Visual Code. … In here, go to ClientApp, then src, … components, Trip, and then Create file. … The first thing that we need to do in here is that … we need to tie all the input fields to the state fields. … So for that, let's go to the form. … Now in here we need to set … the value property to all the input fields. … So let us scroll down in here and write value. … The value is going to be this.state.name. … Let us do the same for the description. … So for that, we just write value is equal … to this.state.description. … Then for the date of start. … So value is equal to this.state.dateStarted. … And let's do the same for the dateCompleted. … So here, let us just change it to dateCompleted. … Another thing that we need to do in here … is that we need to add the onChange event. … So when the user changes the value of an input field, …
- Setting up the app infrastructure
- Creating data models
- Creating, reading, updating, and deleting API endpoints
- Testing API endpoints using Postman
- Reading data from React
- Adding new data from React
- Handling errors
- Implementing Redux in an existing React app
- Implementing authentication in your React app
Skill Level Intermediate
Managing App Secrets in .NET Corewith Ervis Trupja28m 15s Intermediate
1. Setting Up the App Infrastructure
2. Setting Up Web API
3. Getting Started with React
4. Implementing Redux to an Existing React App
5. Implementing Authentication in Your React App
Where to go next44s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.