Loading...
Loading...
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.
npx skill4agent add tanstack/table coreconstructTableimport {
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()))
}featuresdatacolumns.map().filter()[]createColumnHelperhelper.columns()row.getValue('name')const { getValue } = rowthistable.getRowModel().rows| Task | Read |
|---|---|
| Add or repair optional features, processing slots, or prerequisites | Feature architecture, then its relevant feature reference |
| Choose state ownership, initialize or reset state | Shared state |
Fix | TypeScript inference |
| Diagnose a missing export, option, state slice, or instance method | API discovery |
| Implement row numbers, identity, or display-index behavior | Rows |
| Author behavior beyond built-ins or typed meta | Custom features |
| Migrate an existing v8 table | Migration audit |
getting-startedintent load <package>#getting-started<package>@tanstack/react-tabletable-statenode_modules/@tanstack/table-core/dist/index.d.ts