tanstack-preact-table-with-tanstack-virtual

Installation
SKILL.md

This skill builds on @tanstack/table-core#core, getting-started, and table-state. Virtual is renderer composition over the final Table model, never a tableFeatures slot.

Setup

import { useRef } from 'preact/hooks'
import { useVirtualizer } from '@tanstack/react-virtual' // via preact/compat

const scrollRef = useRef<HTMLDivElement>(null)
const rows = table.getRowModel().rows
const virtualizer = useVirtualizer({
  count: rows.length,
  getScrollElement: () => scrollRef.current,
  estimateSize: () => 36,
  getItemKey: (index) => rows[index].id,
  overscan: 5,
})
Installs
3
First Seen
Aug 10, 2026