
React Question & Answer – DEV Community
13)Explain controlled vs uncontrolled components with useRef and useState.Controlled Components: A controlled component is one where the form data is handled by React state. The input value is linked to a state variable using useState, and whenever the user types, we update the state using onChange. This means React is in full control of the…