tanstack-virtual
Installation
SKILL.md
TanStack Virtual
Use this skill when work touches windowed rendering of long lists, grids, tables, feeds, or chat logs with @tanstack/react-virtual, or its framework-agnostic core @tanstack/virtual-core.
Workflow
- Confirm the target before changing code:
- Installed
@tanstack/react-virtualand@tanstack/virtual-coreversions (latest:3.14.14/3.18.0, 2026-10-09), React version, and whether React Compiler is on. Older apps on 3.13.x lackanchorTo,directDomUpdates, andcancelScroll. - The scroller: inner element (
useVirtualizer) or the page (useWindowVirtualizer). - Item sizing: fixed, known per index, or measured from the DOM.
- Data shape: static array, paged or infinite query, prepend-able history, or grouped with sticky headers.
- Installed
- Refresh docs when versions or behavior matter. Start from source-map.md. Check for a v4 only through npm
dist-tags; thev4git branch is stale. - For install, hook choice, base markup, the options table, and the instance API, use setup-core.md.
- For
estimateSize,measureElement, dynamic heights, padding, gap,scrollMargin, and everyscrollTo*method, use sizing-and-scrolling.md. - For horizontal lists, 2D grids, lanes and masonry, sticky items, window scrolling, and
rangeExtractor, use layouts.md. - For chat, logs, reverse feeds, streaming output,
useInfiniteQuery, and scroll restoration, use chat-and-infinite.md. - For TanStack Table rows, columns, and sticky headers, use table-integration.md.
- For SSR, React 19, React Compiler,
directDomUpdates, performance, accessibility, and tests, use production-patterns.md. - For a symptom to fix lookup, use troubleshooting.md.