Skip to content

Commit a9239a5

Browse files
authored
More explicit docs about uncontrolled forms. (#3382)
1 parent 9b8dee5 commit a9239a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/uncontrolled-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ If it's still not clear which type of component you should use for a particular
4545

4646
### Default Values {#default-values}
4747

48-
In the React rendering lifecycle, the `value` attribute on form elements will override the value in the DOM. With an uncontrolled component, you often want React to specify the initial value, but leave subsequent updates uncontrolled. To handle this case, you can specify a `defaultValue` attribute instead of `value`.
48+
In the React rendering lifecycle, the `value` attribute on form elements will override the value in the DOM. With an uncontrolled component, you often want React to specify the initial value, but leave subsequent updates uncontrolled. To handle this case, you can specify a `defaultValue` attribute instead of `value`. Changing the value of `defaultValue` attribute after a component has mounted will not cause any update of the value in the DOM.
4949

5050
```javascript{7}
5151
render() {

0 commit comments

Comments
 (0)