Join Eve Porcello for an in-depth discussion in this video Forms, part of React.js Essential Training.
- [Instructor] A pretty common question that comes up…when dealing with React is how do we handle forms?…Let's create a simple form to demonstrate.…First, let's comment out all of the code…related to our little library app here,…and we're going to replace this with a new component.…This new component is going to be called…Favorite Color Form.…Now within this class we'll add a render method,…as we must do for any of our ESX class components,…and here we're going to add a form.…
This form will have a label for one of our fields…that reads Favorite Color,…and then inside of this label,…we'll add an input, with a type color,…so this'll give us a little color picker to work with,…instead of just a plain old form field.…The next thing we need to do is make sure that…we're rendering our new Favorite Color form,…component to the dom, and we'll just replace that there,…and now we have this little color picker, and the label.…
So when we're dealing with a React component,…and we're trying to handle a form,…we're going to use state to help us parse…
- Refactoring elements with JSX
- Creating components
- Adding component properties and methods
- Displaying child components
- Working with props and state
- Conditional rendering
Skill Level Intermediate
1. What Is React?
2. Introduction to React Elements
3. React Components
4. Props and State
5. Additional Library Features
- 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.