-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large overscan causes unecessary component rerenders during scroll #273
Comments
Hi, it's an expected one. Instead of remounting, applying |
I see, thanks! Yes, an append only mode sounds like it's what I'm looking for. Basically I want to disable virtual scroll temporarily but not remove the VList because I'm lazy :) |
Describe the bug
When you have a large overscroll value to force the entire list to be rendered, items are re-rendered unnecessarily during scroll.
To Reproduce
useEffect(() => console.log('rerender'), [])
to check rerenders.rerender
is printed many times during scroll for the same componentsI have a reproduction codepen here: https://codepen.io/aeharding/pen/VwgVjVz open console and scroll the area, observe rerender is printed many times.
Expected behavior
rerender
only printed once at startup per component with an overscan greater than the entire number of itemsPlatform:
Additional context
None
The text was updated successfully, but these errors were encountered: