Skills

TanStack Table Core

Guides TanStack Table v9 core architecture, data, columns, and inferred types.

Install

npx skills add TanStack/table --skill core -g -a claude-code -y
Repository
TanStack/table28.5k
Category
Engineering
Updated
14d ago
License
MIT
Context cost
Lightabout 994 tokens
Runs scripts
No, instructions only

What it does

Use TanStack Table v9 core architecture, stable data and columns, and inferred types. Route setup, missing APIs, row models, state, features, and framework-specific work.

TanStack Table core

TanStack Table coordinates state and row processing. The renderer owns markup, styles, semantics, and interaction accessibility. Use the installed framework adapter in UI code; use constructTable for framework-neutral integrations.

Minimal setup

<!-- skill-snippet:check -->
import {
  constructTable,
  createColumnHelper,
  tableFeatures,
} from '@tanstack/table-core'
import { storeReactivityBindings } from '@tanstack/table-core/store-reactivity-bindings'

type Person = { id: string; name: string }
const features = tableFeatures({
  coreReactivityFeature: storeReactivityBindings(),
})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])
const data: Person[] = [{ id: '1', name: 'Ada' }]
const table = constructTable({
  features,
  columns,
  data,
  getRowId: (row) => row.id,
})

for (const row of table.getRowModel().rows) {
  console.log(row.getAllCells().map((cell) => cell.getValue()))
}

Essential constraints

  • The core row model is automatic. Optional APIs and state exist only after their feature is registered.
  • Keep features, data, and columns stable between meaningful changes. Derive changing arrays with the adapter's memo/computed mechanism; an inline .map(), .filter(), column factory, or fresh [] fallback invalidates model work and can cause render loops.
  • Let createColumnHelper and helper.columns() preserve accessor value types. Derive feature types from the concrete registry when an explicit boundary is needed.
  • Call row, cell, column, and header methods on their instance. Use row.getValue('name') or a callback that calls it; extracting const { getValue } = row loses its this receiver.
  • Render the final table.getRowModel().rows. The table object itself is not a DOM component.

Read for the current task

Read the whole SKILL.md on GitHub

More in Engineering