Controlled and Uncontrolled Components in React

We are going to discuss with you Controlled and Uncontrolled Components in React.

Controlled components – React Js Controlled Components do not maintain their own internal state and Data is controlled by the parent component. They can easily be controlled by several methods and accept its current value as a prop. It’s notify the changes using callback. Mostly React components are controlled components.

 

Uncontrolled components – React Js Uncontrolled Components maintain their own internal state and Data is controlled by the DOM itself. Refs use for get their current values.

 


Leave a Reply

Be the First to Comment!

avatar
  Subscribe  
Notify of
Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.