component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component
Answers
Answered by
0
if you initially pass undefined or null as the value prop, the component starts life as an "uncontrolled" component. Once you interact with the component, we set a value and react changes it to a "controlled" component, and issues the warning.
Similar questions
Environmental Sciences,
7 months ago
Social Sciences,
7 months ago
Biology,
1 year ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago