svelte/compose-with-tanstack-store

Compose TanStack Table v9 state with Svelte Store atoms via subscriptions and selectors.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of wiring TanStack Table v9 state (sorting, pagination, filters, row selection, etc.) into Svelte reactivity without getting confused about atoms, selectors, and subscriptions.

Core Features & Use Cases

  • Understand the state surfaces: use table.atoms.<slice>, table.store, and table.state with the right level of reactivity.
  • Compose with Store atoms correctly: subscribe with subscribeTable, project with createTable selectors, or own slices externally with createAtom.
  • Avoid common pitfalls: prevent mixing atoms.<slice> with state.<slice>, ensure stable atom creation, and read selector outputs via .current.

Quick Start

Ask the assistant to explain how to subscribe to table.atoms.pagination in a Svelte component using subscribeTable so only pageSize updates trigger reactive UI changes.

Frequently Asked Questions about svelte/compose-with-tanstack-store

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

FAQPage Schema
How do I wire TanStack Table v9 state into Svelte reactivity for sorting and pagination?

Wire TanStack Table v9 state into Svelte reactivity by using table.atoms.<slice> and table.store with subscribeTable to ensure sorting, pagination, and filtering updates trigger reactive UI changes correctly.

What is the difference between table.atoms.<slice> and table.state.<slice> in Svelte?

The difference between table.atoms.<slice> and table.state.<slice> is reactivity: atoms provide reactive subscription surfaces for Svelte runes, while state is a static read surface that does not trigger UI updates on its own.

Why does mixing table.atoms with table.state cause reactivity issues in Svelte?

Mixing table.atoms with table.state causes reactivity issues because state.<slice> bypasses atom subscriptions, preventing Svelte runes from detecting sorting or pagination updates and leading to stale UI rendering.

Can I use createAtom to externally own and manage TanStack Table pagination slices in Svelte?

Yes, you can use createAtom to externally own and manage TanStack Table pagination slices in Svelte, ensuring stable atom creation and proper precedence rules when projecting table state through createTable selectors.

How do I subscribe to table.atoms.pagination in a Svelte component so only pageSize updates trigger reactive UI changes?

Subscribe to table.atoms.pagination using subscribeTable in your Svelte component to isolate reactive updates, ensuring only pageSize changes trigger UI re-renders while ignoring unrelated table state mutations.

Does TanStack Table v9 work with Svelte 5 runes for row selection and filtering?

Yes, TanStack Table v9 works with Svelte 5 runes for row selection and filtering by mapping table.atoms and table.store to runes via useSelector and subscribeTable, enabling proper selector projections and reactive state composition.