From Control Flashcards
How do controlled components differ from uncontrolled components?
controlled components refer to components that have their state and behavior controlled by the parent component.
What are some advantages of using uncontrolled components?
No component re-renders., Browser DOM handles the changes to the element., Simple to use.
What are some advantages of using controlled components?
The UI and the data are in sync., Form data can be passed between different components.
Which style do you prefer?
uncontrolled
What two props must you pass to an input for it to be “controlled”?
usestate, onChange
What are some popular npm packages for creating forms in React?
react hook form, formik, react Final form