petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.13k stars 299 forks source link

feat: add memo for useSize argument #1109

Closed dickeylth closed 1 month ago

dickeylth commented 1 month ago

Add React.useMemo for useSize input param to prevent callback param may accidentally updated, which makes unnecessary ResizeObserver recreation, to speed up scroll performance.

petyosi commented 1 month ago

Nice find!

github-actions[bot] commented 1 month ago

:tada: This PR is included in version 4.7.12 :tada:

The release is available on:

Your semantic-release bot :package::rocket: