Google News
logo
ReactJS - Interview Questions
What are the controlled components and uncontrolled components in ReactJS ?
Controlled component is more advisable to use as it is easier to implement forms in it. In this, form data are handled by React components. A controlled input accepts values as props and callbacks to change that value.
 
uncontrolled component is a substitute for controlled components. Here form data is handled by DOM itself. In uncomfortable components, the ref can be used to get the form values from DOM.
Advertisement