devtools
できること
このスキルは、Preactの表をTanStack Devtoolsのパネルに登録する方法を示します。開発者は作りながら表を確認できます。開発中に表の状態を見たいPreactの開発者向けです。
使う場面
- ✓開発中にアプリを動かしながら、Preactの表の状態を調べたいとき。
- ✓表がdevtoolsパネルにない場合に、その登録を確認する必要があるとき。
- ✓ReactとPreactのパッケージが混在し、devtoolsが正しく接続しないとき。
スキルのリンク
https://github.com/TanStack/table/blob/main/packages/preact-table-devtools/skills/devtools/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Preactの表がTanStackのdevtoolsパネルに表示されません。どう接続すればよいですか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
一意のキーを付けて表を作り、Preactのフックで登録し、アプリのルート近くでdevtoolsのプラグインを一度追加する方法を説明します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
This skill builds on @tanstack/table-core#core and @tanstack/table-devtools#devtools.
Setup
import { TanStackDevtools } from '@tanstack/preact-devtools'
import { useTable, tableFeatures } from '@tanstack/preact-table'
import {
tableDevtoolsPlugin,
useTanStackTableDevtools,
} from '@tanstack/preact-table-devtools'
const features = tableFeatures({})
const columns = [{ accessorKey: 'id' }]
const data: Array<{ id: string }> = []
export function App() {
const table = useTable({
key: 'users-table',
features,
columns,
data,
})
useTanStackTableDevtools(table)
return <TanStackDevtools plugins={[tableDevtoolsPlugin()]} />
}
Hooks and Components
Use the native Preact packages throughout. Pass { enabled } rather than conditionally calling the registration hook.
Common Mistakes
HIGH React Devtools package mixed into Preact
Wrong: import the hook from @tanstack/react-table-devtools through compat.
Correct: use @tanstack/preact-table-devtools with @tanstack/preact-devtools.
The native adapter owns Preact effect lifecycle and plugin types.
Source: TanStack/table:docs/devtools.md
HIGH Missing or duplicate key
Wrong: omit key or reuse users-table for multiple mounted tables.
Correct: give each live table one stable unique key.
Keyless registration is skipped; duplicate keys replace targets.
Source: TanStack/table:packages/table-devtools/src/tableTarget.ts
MEDIUM Production no-op mistaken for failure
Wrong: expect the default entrypoint to stay active in a production bundle.
Correct: keep Devtools development-only unless an explicit production import is required.
The default index deliberately selects no-op implementations outside development.
Source: TanStack/table:packages/preact-table-devtools/src/index.ts
API Discovery
Inspect node_modules/@tanstack/preact-table-devtools/dist/index.d.ts and useTanStackTableDevtools.d.ts; do not copy React adapter imports.
よくある質問
なぜ各表にキーが必要なのですか?
キーのない表はスキップされ、同じキーを持つ2つの表はパネルで互いに置き換わってしまいます。
登録のオン・オフを切り替えられますか?
はい、フックはenabledのオプションを受け取るので、呼び出しを削除せずにオフにできます。
PreactのアプリでReactのdevtoolsのパッケージを使うべきですか?
いいえ、互換のエイリアスを通じてReactのパッケージを使わず、ネイティブのPreactのパッケージを使うようスキルは述べています。
詳細
作者による元の説明
Connect native Preact Table v9 instances to Devtools with tableDevtoolsPlugin and useTanStackTableDevtools. Load for React-package mixups, missing targets, required options.key, enabled state, cleanup, or development gating.
repo: TanStack/table
人気
- GitHubのスター
- 29k
- ランキング
- #9819
- ライセンス
- 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 において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。