Skip to content

Commit c30ff1e

Browse files
committed
Add onFocusIn note
1 parent 304535a commit c30ff1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ We've made a couple of smaller changes related to the event system:
123123

124124
These changes align React closer with the browser behavior and improve interoperability.
125125

126+
>Note
127+
>
128+
>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.
129+
126130
### No Event Pooling {#no-event-pooling}
127131

128132
React 17 removes the "event pooling" optimization from React. It doesn't improve performance in modern browsers and confuses even experienced React users:

0 commit comments

Comments
 (0)