Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/docs/06-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,18 @@ For HTML, this easily allows developers to supply multiline values. However, sin
```

If you *do* decide to use children, they will behave like `defaultValue`.


### Why Select Value?

The selected `<option>` in an HTML `<select>` is normally specified through that option's `selected` attribute. In React, in order to make components easier to manipulate, the following format is adopted instead:

```javascript
<select value="B">
<option value="A">Apple</option>
<option value="B">Banana</option>
<option value="C">Cranberry</option>
</select>
```

To make an uncontrolled component, `defaultValue` is used instead.