Browse Source

Add onFocusIn note

main
Dan Abramov 4 years ago
parent
commit
c30ff1e39b
  1. 4
      content/blog/2020-08-10-react-v17-rc.md

4
content/blog/2020-08-10-react-v17-rc.md

@ -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:

Loading…
Cancel
Save