mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge pull request #4003 from AnSavvides/on-change-vs-on-input
[#3964] Add note about React's onChange vs. DOM's oninput
This commit is contained in:
commit
61d8de3f3f
1 file changed
+4
@@ -28,6 +28,10 @@ Form components allow listening for changes by setting a callback to the `onChan
|
||||
|
||||
Like all DOM events, the `onChange` prop is supported on all native components and can be used to listen to bubbled change events.
|
||||
|
||||
> Note:
|
||||
>
|
||||
> For `<input>` and `<textarea>`, `onChange` supersedes — and should generally be used instead of — the DOM's built-in [`oninput`](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oninput) event handler.
|
||||
|
||||
|
||||
## Controlled Components
|
||||
|
||||
|
||||
Reference in new issue
Block a user