TanStackT
TanStack3y ago
33 replies
spotty-amber

why does the component re-renders on each scroll change

it seems that the hook returns a new virtualizer and new virtual items (deeply equal to the prev ones)
each time the scroll offset changes.

It forces me to do very weird things to avoid over-rendering the component.

the only thing that I can think of that actually changes is the scroll offset, which is now returned on the virtualizer as a prop
Was this page helpful?