When dealing with form
s or input
s in React, everyone's probably come across the following warning:
A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.
Why is it important for components not to change from Uncontrolled to Controlled, or vice versa? I understand that they are just warnings and that they are there for a reason, so you should fix it.
But what is the reason to fix it? Why should that not happen?