table-state
できること
ページ番号などのテーブルの設定が、Solidアプリでどう働くかを説明します。テーブルと自分のコンポーネントが同じ値に反応する必要があるSolid開発者向けです。
使う場面
- ✓Solidのテンプレートで現在のページなど、テーブルの設定を表示する必要があるとき。
- ✓テーブルの設定をSolidのシグナルやmemoにつなぐ必要があるとき。
- ✓テーブルが変わってもコンポーネント本体で読んだ値が更新されないとき。
スキルのリンク
https://github.com/TanStack/table/blob/main/packages/solid-table/skills/table-state/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Solidテーブルの現在のページ番号を、ボタンのラベルに最新の状態で表示する方法を教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
JSX、memo、effectの中でテーブルのatomsを読むと、Solidが変化を追跡する仕組みを示します。また、更新関数を受け付けるセッターで制御されたシグナルを渡す方法も説明します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
コンポーネント本体で値を読んでも更新されないのはなぜですか?
Solidはコンポーネント本体での読み取りを追跡しないため、そこでの値は単なるスナップショットになるからです。
テーブルのSubscribeコンポーネントはまだ必要ですか?
いいえ。非推奨になっており、JSX、memo、effectでatomsを直接読めば十分だとこのスキルは説明しています。
セッターは更新関数を受け付けますか?
はい。Solidのセッターは、値そのものと更新関数の両方を受け付けます。テーブルもこの形式を想定しています。
詳細
作者による元の説明
Read and control Table v9 state in solid. Use for tracked reads, subscriptions, controlled slices, and framework-specific reactive boundaries.
repo: TanStack/table
人気
- GitHubのスター
- 29k
- ランキング
- #9830
- ライセンス
- MIT
- 更新日
- 2026/10/21
コメント
- …
このリポジトリの他のスキル
getting-started
29kエージェントが、Alpine.jsでTanStack Tableを使ってデータテーブルを作り、表示する方法を教えます。セットアップ、リアクティブなデータ、行の描画を扱います。
table-state
29kエージェントが、Alpine.jsで表の状態(現在のページなど)を読み取り、制御する方法を教えます。その状態が変わると、画面が更新されます。
devtools
29kエージェントが、Angularの表をTanStack Devtoolsのパネルに登録する方法を教えます。開発者はアプリを作りながら、各表を調べられます。
getting-started
29kエージェントが、AngularでTanStack Tableの表を作り、表示する方法を教えます。injectTableの設定、テンプレートの描画、行データの更新を扱います。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。