tanstack-lit-table-table-state
Installation
SKILL.md
This skill builds on @tanstack/table-core#core and this package's getting-started skill.
State Mental Model
TanStack Table is primarily a state coordinator. Keep state internal unless another subsystem needs to read, persist, or drive it. Without initialState, atoms, state, or on[State]Change, the table owns every registered slice.
table.baseAtomsare internal writable atoms initialized from resolved initial state.table.atomsare readonly derived atoms for the active owner of each registered slice.table.storecombines those atoms into one readonly flat store.table.stateis only the value selected by the secondcontroller.tableargument.
TableController subscribes to state/options and requests host updates. State is feature-based: if pagination is missing from options, atoms, or types, register rowPaginationFeature. Keep features, columns, and data references stable across render() calls; never create arrays or derive rows inline in the controller.table options.