React · Junior · Question 67 of 75
How does defaultValue differ from value on an input?
- ✓Correct answer:
defaultValuesets only the initial value of an uncontrolled input;valuemakes it controlled by React state - 2They are synonyms
- 3
defaultValueupdates the input whenever it changes
Explanation
Uncontrolled inputs keep their value in the DOM; you read it on submit (e.g. via FormData). Changing defaultValue later has no effect.