create-table-hook
Installation
SKILL.md
This skill builds on @tanstack/table-core#core, getting-started, and table-state. Use a factory when multiple tables share real conventions; use standalone useTable for a one-off.
Setup
import {
createTableHook,
rowSelectionFeature,
tableFeatures,
} from '@tanstack/react-table'
export const { createAppColumnHelper, useAppTable, useTableContext } =
createTableHook({
features: tableFeatures({ rowSelectionFeature }),
getRowId: (row: { id: string }) => row.id,
})
Keep this factory in an infrastructure module. It binds feature types and defaults once while each useAppTable call still supplies its own data, columns, state, and initial state.