Browse Source

Wording nits

main
Brian Vaughn 7 years ago
committed by GitHub
parent
commit
5a084dd028
  1. 6
      content/docs/forms.md

6
content/docs/forms.md

@ -266,11 +266,9 @@ Also, since `setState()` automatically [merges a partial state into the current
## Controlled Input Null Value ## Controlled Input Null Value
Specifying the value prop on a [controlled component](/docs/forms.html#controlled-components) prevents the user from changing the input unless you desire so. Specifying the value prop on a [controlled component](/docs/forms.html#controlled-components) prevents the user from changing the input unless you desire so. If you've specified a `value` but the input is still editable, you may have accidentally set `value` to `undefined` or `null`.
You might have encountered a situation where value is specified but an input is still editable. In this case you might have accidentally set value to undefined or null. The following code demonstrates this. (The input is locked at first but becomes editable after a short delay.)
The following code demonstrates this. (The input becomes editable after a short delay.)
```javascript ```javascript
ReactDOM.render(<input value="hi" />, mountNode); ReactDOM.render(<input value="hi" />, mountNode);

Loading…
Cancel
Save