Controlled and uncontrolled form components
So far in this book, we have become familiar with components and how they are the building blocks of any React application. When you blend pieces of independently designed components, you get either a UI component or a full-fledged React web application, depending on what you are working on.
The component-driven approach of React is not going to change anytime soon. Building quality UIs for applications is what React does best. You are going to need a high-performant form one way or the other in your career as a developer, and React has you covered with two approaches to building air-tight form components that prevent data loss and improve user experience regarding form interaction.
These two approaches are controlled and uncontrolled form components. Let’s start with controlled form components so that we have a sufficient understanding of how they are implemented and why they are the React-recommended approach to form handling...