npm / @tanstack/react-virtual
@tanstack/react-virtual
What changed in @tanstack/react-virtual 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
2 new APIs and options1 performance1 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@tanstack/react-virtual 38 changes
New APIs and options 2
Adds opt-in direct DOM updates for scroll positioning, with directDomUpdatesMode and containerRef.
Adds a React-specific option to control whether flushSync is used for synchronous scroll correction during measurement. It defaults to true; disabling it avoids the React 19 warning but may increase visible whitespace during fast scrolling with dynamically sized items.
Performance 1
Uses an incrementing number counter instead of allocating an object on each dispatch, eliminating a steady-state GC source in scroll-heavy apps.
Behavior and default changes 1
When containerRef is omitted, directDomUpdates skips all direct DOM writes while continuing to skip re-renders, allowing consumers to own DOM updates.
Fixes and other changes 4
Rows that mount without the owner re-rendering are now positioned as they register through measureElement, or when they mount with the container.
The synchronous notify raised from measureElement no longer uses flushSync, avoiding a development warning when React calls it from a ref callback during commit.
Fixes a gap at the top of the list after an end-anchored prepend by growing the size container before syncing the scroll position.
When measurement-affecting options such as count change, the virtualizer now notifies the framework so getTotalSize() updates without manual useMemo workarounds.