Frontend & UISûr100100/100
getting started tanstack table react table
Create and render a TanStack React Table v9 table with useTable, tableFeatures, stable data and columns, row/header models, and table.FlexRender. Load for a first React table, headless rendering, or when v8 useReactTable examples are producing the wrong setup.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ npx arboris-cli install getting-started__tanstack-table__packages-react-table-skills-d0a18e2e6b35Contenu à copier
---
name: getting-started
description: >
Create and render a TanStack React Table v9 table with useTable, tableFeatures, stable data and columns, row/header models, and table.FlexRender. Load for a first React table, headless rendering, or when v8 useReactTable examples are producing the wrong setup.
metadata:
origin: TanStack
type: framework
library: '@tanstack/react-table'
library_version: '9.2.4'
framework: react
requires:
- '@tanstack/table-core#core'
- '@tanstack/table-core#table-features'
sources:
- 'TanStack/table:docs/framework/react/guide/migrating.md'
- 'TanStack/table:examples/react/basic-use-table'
- 'TanStack/table:packages/react-table/src/index.ts'
---
This skill builds on `@tanstack/table-core#core` and `@tanstack/table-core#table-features`. Read them first for the headless model and explicit feature registration.
## Setup
```tsx
import { useMemo, useState } from 'react'
import {
createColumnHelper,
tableFeatures,
useTable,
} from '@tanstack/react-table'
type Person = { name: string; age: number }
const features = tableFeatures({})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([
helper.accessor('name', { header: 'Name' }),
helper.accessor('age', { header: 'Age' }),
])
export function PeopleTable() {
const [data] = useState<Person[]>([{ name: 'Ada', age: 36 }])
const table = useTable({ features, columns, data })
return (
<table>
<thead>
{table.getHeaderGroups().map((group) => (
<tr key={group.id}>
{group.headers.map((header) => (
<th key={header.id}>
{header.isPlaceholder ? null : (
<table.FlexRender header={header} />
)}
</th>
))}
</tr>
))}
</thead>
<tbody>
{table.getRowModel().rows.map((row) => (
<tr key={row.id}>
{row.getAllCells().map((cell) => (
<td key={cell.id}>
<table.FlexRender cell={cell} />
</td>
))}
</tr>
))}
</tbody>
</table>
)
}
```
Table produces models and state; React owns the semantic markup, styles, event affordances, and accessibility.
## Core Patterns
### Add only the feature the table uses
```tsx
import {
createSortedRowModel,
rowSortingFeature,
tableFeatures,
} from '@tanstack/react-table'
const sortableFeatures = tableFeatures({
rowSortingFeature,
sortedRowModel: createSortedRowModel(),
})
```
Row-model slots belong inside `tableFeatures`, after their prerequisite feature.
### Keep static inputs outside render
```tsx
const features = tableFeatures({})
const data: Person[] = [{ name: 'Ada', age: 36 }]
```
Use state, memoization, or query results for changing data; avoid a new fallback array every render.
## Common Mistakes
### HIGH Copying the v8 table constructor
Wrong:
```tsx
const table = useReactTable({
data,
columns,
getCoreRowModel: getCoreRowModel(),
})
```
Correct:
```tsx
const table = useTable({ data, columns, features })
```
V9 uses `useTable`; optional row models are registered as feature slots rather than table options.
Source: `docs/framework/react/guide/migrating.md`
### HIGH Assuming feature APIs are global
Wrong:
```tsx
const features = tableFeatures({})
```
Correct:
```tsx
const features = tableFeatures({
rowSortingFeature,
sortedRowModel: createSortedRowModel(),
})
```
Sorting state and methods do not exist until the sorting feature is registered.
Source: `packages/table-core/src/TableFeatures.ts`
### MEDIUM Recreating fallback data each render
Wrong:
```tsx
const table = useTable({ features, columns, data: response.data ?? [] })
```
Correct:
```tsx
// module scope
const EMPTY_DATA: Person[] = []
const table = useTable({ features, columns, data: response.data ?? EMPTY_DATA })
```
A fresh fallback invalidates data-dependent models on every render.
Source: `docs/framework/react/guide/data.md`
## API Discovery
Inspect `node_modules/@tanstack/react-table/dist/index.d.ts` first, then the exported `useTable.d.ts`, `FlexRender.d.ts`, or core feature source. Use installed declarations so names match the consumer's exact v9 version.Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait getting started tanstack table react table
Applique les pratiques du skill getting-started__tanstack-table__packages-react-table-skills-d0a18e2e6b35.
Comment utiliser getting started tanstack table react table
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour getting started tanstack table react table
Dis simplement à ton agent quelque chose comme :
Applique le skill getting-started__tanstack-table__packages-react-table-skills-d0a18e2e6b35 à cette tâche
Utilise getting-started__tanstack-table__packages-react-table-skills-d0a18e2e6b35 pour améliorer cette implémentation
Passe en revue ce sujet avec getting-started__tanstack-table__packages-react-table-skills-d0a18e2e6b35
Skills liés à getting started tanstack table react table
accessibility
Design, implement, and audit inclusive digital products using WCAG 2.2 Level AAaccessibility pass microsoft cat agent skills
Use this skill whenever the user asks to check, review, or fix the accessibility of a PowerPoint deck, Word document, HTML page, or Markdown file, and before handing over any deck or document this agent just generated, so it does not ship with missing alt text, untitled slides, or unreadable colour contrast.add connector microsoft power platform skills
Use when adding a Power Platform connector to an Expo/React Native Power Apps mobile app and no dedicated mobile connector skill exists.