Skip to content
Skillpedia
Websites & UI (frontend)29k · #9830

table-state

What it does

This skill explains how table settings, like the current page, work in a Solid app. It is for Solid developers who need the table and their own components to react to the same values.

When to use it

  • ✓When a Solid template must show the current page or another table setting.
  • ✓When you need to connect a table setting to a Solid signal or memo.
  • ✓When a value read in a component body does not update after the table changes.

Skill link

https://github.com/TanStack/table/blob/main/packages/solid-table/skills/table-state/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/TanStack/table/blob/main/packages/solid-table/skills/table-state/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“How do I show the current page number from my Solid table in a button label that stays up to date?”

5 new skills a week. 1 minute to read.

How it works

It shows how to read the table's atoms inside JSX, memos or effects, where Solid tracks them, and how to pass controlled signals with setters that accept updater functions.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Solid table state

Before starting, run intent load @tanstack/table-core#table-state for shared ownership, initialization, updates, and resets.

Read reactive state

The adapter backs table atoms with Solid signals and memos. Read table.atoms.<slice>.get() inside JSX, createMemo, createEffect, or another tracked scope. A value captured once outside tracking is only a snapshot. Solid has no React-style selected table.state.

table.Subscribe is deprecated and adds no subscription or tracking scope. Read table.atoms directly inside JSX, memos, or effects. Component bodies are untracked; keep reads inside tracked scopes. Track the required atoms instead of adding whole-store forced rerenders.

Control a slice

Keep features and columns stable. Expose changing data and controlled state through getters. Solid setters already accept Table's raw values and updater functions:

import { createMemo, createSignal } from 'solid-js'
import {
  createTable,
  rowPaginationFeature,
  tableFeatures,
  type PaginationState,
} from '@tanstack/solid-table'

const features = tableFeatures({ rowPaginationFeature })
const columns = [{ accessorKey: 'name' }]

export function PageControl() {
  const [data] = createSignal([{ name: 'Ada' }])
  const [pagination, setPagination] = createSignal<PaginationState>({
    pageIndex: 0,
    pageSize: 20,
  })
  const table = createTable({
    features,
    columns,
    get data() {
      return data()
    },
    state: {
      get pagination() {
        return pagination()
      },
    },
    onPaginationChange: setPagination,
  })
  const pageSize = createMemo(() => table.atoms.pagination.get().pageSize)
  return (
    <button onClick={() => table.setPageSize(50)}>
      {pageSize()} rows per page
    </button>
  )
}

When wrapping a setter to add a side effect, resolve both updater forms before storing the result. For shared atom ownership, use createAtom from @tanstack/solid-store and pass it in atoms.<slice>.

For external atoms, custom updater wrappers, or tracking failures, read reactivity details. If this task changes processing features, run intent load @tanstack/table-core#table-features and read the relevant feature references.

API discovery

Inspect node_modules/@tanstack/solid-table/dist/createTable.d.ts and reactivity.d.ts; inspect @tanstack/solid-store declarations for external atoms.

FAQ

Why does reading a value in the component body not update?

Solid does not track reads in the component body, so the value is only a snapshot there.

Is the table Subscribe component still needed?

No. The skill says it is deprecated and that reading the table's atoms directly in JSX, memos or effects works instead.

Can a setter accept an updater function?

Yes. Solid setters accept both raw values and updater functions, which is what the table expects.

Details

Original description by the author

Read and control Table v9 state in solid. Use for tracked reads, subscriptions, controlled slices, and framework-specific reactive boundaries.

repo: TanStack/table

Popularity

GitHub stars
29k
Ranking position
#9830
License
MIT
Updated
10/21/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills