Commit bfd4970
Make children optional, correctness changes
The children can also be any ReactNode in React 16, as opposed to only JSX.Element. Even in React 15, the current definitions exclude `string` and `number`.
`children` is optional, especially when `render` is provided.
The `onChange` is passed through to the top level element so if the `tag` happens to be one with an `onChange` event, the `onChange` callback may be called with `React.FormEvent`.1 parent ccebaf2 commit bfd4970
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments