Join Joe Chellman for an in-depth discussion in this video Forms in React: Controlled or not, part of React for Web Designers (2018).
- [Instructor] The next step we'll be taking…is updating our little app's state,…based on what happens in our filter form here.…But before we do that,…let's take a brief pause to talk about the two main ways…that you can work with forms in React.…Specifically, we're going to be talking about controlled…versus uncontrolled form elements.…What we're asking here is who is the source of truth…for the form data?…It can either be React's state…or it can be the DOM elements that comprise the form.…First, we'll talk about controlled components.…
A controlled form component is one where React…is the source of truth,…or more specifically,…React's state is the source of truth.…That means that your code controls…whether the form value changes.…So for example,…you can do validation in your React code,…and then not update the state…of the element that you're validating,…and the value won't change…no matter what the user has typed.…When you're working with controlled components,…every piece of state works exactly the same way,…
- Identify notable features about how React works.
- Identify good early steps for any React project.
- Explain why the little PHP app that powers our API has a way to add delay.
- Outline what a lifecycle method is.
- Recall the React convention that must be followed when adding a status message.
- Explain the purpose of React.Fragment.
Skill Level Intermediate
1. Introducing React
2. First Project: Customizer
3. Second Project: Directory Browser
4. Third Project: Status Updater
Next steps: Lots more React2m 37s
- 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.