In this video, learn how to start getting the PostForm component ready by bringing the fields under React’s control.
- [Instructor] Now we need to start wiring up this post form … so it can send updates to the API. … We'll take this in two pieces. … First, the form is currently uncontrolled, … so we can type in it all we want, … and React does not notice. … We'll handle that in this video. … The second part, we'll be taking action … when the form is submitted. … Over here in hotel.js, here is my post form component, … and here are my form fields. … So the first thing that I'm going to do is add a little bit … of state to hold the values of those fields. … So we'll have one called message text, … which will have set message text to go with it, … and these will come from React.usestate, … and the initial value for message text … will be an empty string. … We'll call React.usestate again. … This time it will be for the message type, … that select box. … Set message type and the initial value … will be this default type that we saved earlier. … Now we need to update our form fields. … We'll start with the text area. …
- Installing React on an existing site
- Thinking about a design in terms of components
- Creating fully-featured function components using Hooks
- Storing and retrieving data from an external RESTful API
- Employing third-party components for CSS animation
- Using conditional rendering
Skill Level Intermediate
Essentials of CSS for React Developerswith Eric Greene53m 31s Beginner
React.js Essential Training (2018)with Eve Porcello1h 25m Intermediate
Using the exercise files1m 2s
1. Introducing React
2. First Project: Customizer
3. Second Project: Directory Browser
4. Third Project: Status Updater
- 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.