
Getting Started
Create and render Table v9 with the solid adapter.
Install
npx skills add TanStack/table --skill getting-started -g -a claude-code -y- Repository
- TanStack/table28.5k
- Category
- Engineering
- Updated
- 14d ago
- License
- MIT
- Context cost
- Lightabout 778 tokens
- Runs scripts
- No, instructions only
What it does
Create and render Table v9 with the solid adapter. Route reusable createTableHook components, Query and Virtual integration, and framework setup; use table-state for reactive ownership.
Solid Table setup and integration
Before starting, run intent load @tanstack/table-core#core for the shared headless model and stable-input rules.
Setup
import { For, createSignal } from 'solid-js'
import {
createColumnHelper,
createTable,
tableFeatures,
} from '@tanstack/solid-table'
type Person = { name: string }
const features = tableFeatures({})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])
export function PeopleTable() {
const [data] = createSignal<Person[]>([{ name: 'Ada' }])
const table = createTable({
features,
columns,
get data() {
return data()
},
})
return (
<table>
<thead>
<For each={table.getHeaderGroups()}>
{(group) => (
<tr>
<For each={group.headers}>
{(header) => (
<th>
<table.FlexRender header={header} />
</th>
)}
</For>
</tr>
)}
</For>
</thead>
<tbody>
<For each={table.getRowModel().rows}>
{(row) => (
<tr>
<For each={row.getAllCells()}>
{(cell) => (
<td>
<table.FlexRender cell={cell} />
</td>
)}
</For>
</tr>
)}
</For>
</tbody>
</table>
)
}
Essential constraints
Use createTable in a Solid owner. Preserve changing data with get data() { return data() }; data: data() captures a snapshot. Keep features and columns stable and derive transformed arrays with createMemo.
