mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
Add onFocusIn note
This commit is contained in:
@@ -123,6 +123,10 @@ We've made a couple of smaller changes related to the event system:
|
||||
|
||||
These changes align React closer with the browser behavior and improve interoperability.
|
||||
|
||||
>Note
|
||||
>
|
||||
>Although React 17 switched from `focus` to `focusin` *under the hood* for the `onFocus` event, note that this has **not** affected the bubbling behavior. In React, `onFocus` event has always bubbled, and it continues to do so in React 17 because generally it is a more useful default. See [this sandbox](https://codesandbox.io/s/strange-albattani-7tqr7?file=/src/App.js) for the different checks you can add for different particular use cases.
|
||||
|
||||
### No Event Pooling {#no-event-pooling}
|
||||
|
||||
React 17 removes the "event pooling" optimization from React. It doesn't improve performance in modern browsers and confuses even experienced React users:
|
||||
|
||||
Reference in New Issue
Block a user