angular/table-state

Wire TanStack Table v9 state slices into Angular signals via injectTable.

28.3k|3.6k|Updated Oct 20, 2016
One-click install
npx skills add https://github.com/TanStack/table --skill angular-table-state
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular/table-state
Source: https://github.com/TanStack/table/tree/main/packages/angular-table/skills/angular/table-state
Command: npx skills add https://github.com/TanStack/table --skill angular-table-state

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents missing APIs and broken reactivity in TanStack Table v9 by teaching you how to correctly own, initialize, and read table state in Angular using feature-registered slices and signal-backed atoms.

Core Features & Use Cases

  • Feature-registered state slices in v9: explains that a state slice only exists when its feature is registered in _features, eliminating “Property does not exist” TypeScript issues.
  • injectTable lazy initializer model: shows how to place stable references outside the initializer while keeping reactive signal reads inside it so the table syncs correctly.
  • Three state surfaces (baseAtoms, atoms, store.state): teaches when to read from table.atoms.<slice>.get(), when a snapshot from table.store.state is enough, and how to use computed(...) for derivations and shallow equality.
  • Controlled state ownership with Angular signals: provides the recommended state + on[State]Change pattern and clarifies updater-or-value handling to keep ownership consistent.
  • External atom alternative: covers how and when to use atoms: { pagination: paginationAtom } for app-wide cross-component coordination.
  • Failure-mode guardrails: highlights common v8-to-v9 migration mistakes, missing _features, and incorrect direct atom/state writes that bypass handlers.

Quick Start

Configure your Angular Table v9 by registering the needed features in _features, creating the table via injectTable(() => ({ _features, _rowModels, columns, data: this.data(), initialState, state, on[State]Change })), and then read reactive values from table.atoms.<slice>.get() inside templates or Angular computed/effect blocks.

Frequently Asked Questions about angular/table-state

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage TanStack Table state in Angular using signals?

Manage TanStack Table state in Angular by wiring feature-registered slices into injectTable, using Angular signals for controlled state, and reading table.atoms.<slice>.get() within templates and computed or effect blocks.

Why does my TanStack Table v9 state slice property not exist in TypeScript?

TanStack Table v9 state slice properties only exist when their corresponding feature is registered in the _features array, which prevents property does not exist TypeScript issues during table initialization.

What is the best way to handle controlled state ownership with Angular signals in TanStack Table?

The best way to handle controlled state ownership is using the state plus on[State]Change pattern, which clarifies updater-or-value handling to keep Angular signal ownership consistent.

How do I read reactive table state values without breaking reactivity in Angular?

Read reactive table state values by calling table.atoms.<slice>.get() inside Angular templates or computed and effect blocks, ensuring proper reactivity and shallow equality for derivations.

When should I use external atoms for TanStack Table state in Angular?

Use external atoms, such as atoms pagination paginationAtom, when you need app-wide cross-component coordination for your Angular table state across multiple components.

What are common migration mistakes when moving TanStack Table state to v9 in Angular?

Common TanStack Table v9 migration mistakes include missing _features registration, using v8 API hallucinations, and making direct atom or state writes that bypass on[State]Change handlers and break synchronization.