Controlled Components
In simple HTML elements like input tags, the value of the input field is changed whenever the user type. But, In React, whatever the value the user types we save it in state and pass the same value to the input tag as its value, so here DOM does not change its value, it is controlled by react state. These are known as Controlled Components.
This may sound complicated But let’s understand with an example.
React Forms
React Forms are the components used to collect and manage the user inputs. These components includes the input elements like text field, check box, date input, dropdowns etc.
In HTML forms the data is usually handled by the DOM itself but in the case of React Forms data is handled by the react components.
Table of Content
- React Forms
- Controlled Components
- Adding Forms in React
- Handling React Forms
- Submitting React Forms
- Multiple Input Fields
- Alternatives to Controlled Components