Loading tutorials
onClick. You should also be comfortable with basic HTML form elements. The chapter covers how useState holds what a user types. The next chapter explains why the input nee2 min readuseState. Here you will learn what makes an input controlled and why React needs both value and onChange.3 min readuseState, object spread syntax, destructuring, and how a single controlled input works (a value prop plus an onChange handler). If those are unfamiliar, review the previous chapter first.2 min readuseState, and that you know object spread and destructuring. Text inputs use value. Other form elements follow the same controlled pattern, but each one reads and writes a different property. Using the wrong property is the most com2 min readuseState, JSX event handlers, and the controlled input pattern from earlier chapters. Here you will handle the submit event, stop the browser's default behavior, and read the values you collected in state.2 min readuseState, JSX event handlers, and how the earlier chapters built controlled inputs with value and onChange.2 min readonSubmit with preventDefault, and basic JavaScript objects and destructuring. Here you read an uncontrolled form once, at submit time, with the browser's FormData API.2 min readuseState, and handle onChange and onSubmit events. It also assumes you know how to keep several fields in one state object, as covered in earlier chapters.2 min readvalidate function, as in the earlier chapters. It adds the rule for when an error should appear.2 min readuseState, handle onSubmit, and write a validation function that returns an errors object. Here you will make that form usable with a screen reader and a keyboard.3 min readuseState, keep several fields in one state object, and handle onSubmit. It covers where a form's starting values come from and how to put the form back to that starting point.2 min readvalue plus onChange), useState, useEffect, and preventDefault on submit. It also uses FormData, which was covered earlier.2 min readuseState, and have built a controlled input (an input whose value comes from state and whose onChange writes back to state). It covers why controlled inputs re-render on every keystroke, when that matters, and what to do about it.3 min readuseState, validate values in a pure function, and read an uncontrolled form with FormData. It helps you decide when that hand-written approach is enough and when a library is worth adding.2 min read