本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)29k · #9839

devtools

できること

TanStack Tableのインスタンスを、Devtoolsパネルに接続してオプション、状態、行を調べられるようにする方法を説明します。複数のフレームワークに共通する登録の手順を扱います。

使う場面

  • ✓テーブルがDevtoolsパネルに表示されず、接続を直す必要があるとき。
  • ✓対応するフレームワークで開発中に、テーブルの状態と行を調べたいとき。
  • ✓Devtoolsが開発ビルドだけに限られるようにしたいとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/TanStack/table/blob/main/packages/table-devtools/skills/devtools/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“TanStack TableをDevtoolsに登録して、行と状態を見られるようにする方法を教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

各テーブルに一意のキーが必要なこと、フレームワークのフックが登録を自動で行うこと、標準のDevtoolsの入り口は開発環境以外では何もしないことを説明します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Setup

Framework adapters should use their lifecycle hook or injector. The framework-neutral registration primitive is:

import { constructTable, tableFeatures } from '@tanstack/table-core'
import { storeReactivityBindings } from '@tanstack/table-core/store-reactivity-bindings'
import { upsertTableDevtoolsTarget } from '@tanstack/table-devtools'

const features = tableFeatures({
  coreReactivityFeature: storeReactivityBindings(),
})

const table = constructTable({
  key: 'users-table',
  features,
  columns: [],
  data: [],
})

const cleanup = upsertTableDevtoolsTarget({ table })
cleanup()

Core Patterns

Give every live table a descriptive unique key

The non-empty options.key is both registry identity and panel label. Use stable application identity, not an array index.

Let adapter lifecycles own registration

React/Preact/Solid/Vue hooks and the Angular injector register and clean up at the correct time. Use core target functions only for unsupported frameworks or infrastructure code.

Keep ordinary Devtools development-only

Default entrypoints export no-op panels/plugins outside development. Use /production only when the application explicitly chooses production inspection and its security/bundle implications.

Common Mistakes

HIGH Missing key skips registration

Wrong: register a table whose options.key is absent or whitespace.

Correct: set a stable value such as key: 'billing-invoices' before registration.

The registry logs the missing-key error and returns without adding a target.

Source: TanStack/table:packages/table-devtools/src/tableTarget.ts

HIGH Two tables share one key

Wrong: use key: 'table' for simultaneous tables.

Correct: use unique domain identities such as users-table and orders-table.

Upserting a different table under an existing key replaces that registration.

Source: TanStack/table:packages/table-devtools/src/tableTarget.ts

MEDIUM Production panel expected by default

Wrong: debug why the normal entrypoint renders nothing in production.

Correct: keep Devtools development-only unless production inspection was explicitly requested; then import the documented /production entrypoint.

Default production exports intentionally use no-op implementations.

Source: TanStack/table:docs/devtools.md

API Discovery

Inspect node_modules/@tanstack/table-devtools/dist/index.d.ts, tableTarget.d.ts, and production.d.ts. Framework registration belongs to the matching @tanstack/<framework>-table-devtools package.

よくある質問

テーブルが表示されないのはなぜですか?

キーがない、または空のテーブルは対象外になるため、各テーブルに一意のキーが必要です。

Devtoolsを本番環境で使えますか?

明示的な本番用の入り口を選べば使えますが、セキュリティとバンドルサイズへの影響があります。

登録用の関数を自分で呼ぶ必要がありますか?

通常は不要です。フレームワークのフックやインジェクターが登録と後片付けを行い、生の関数は対応していないフレームワーク向けです。

詳細

作者による元の説明

Register TanStack Table targets and inspect options, state, features, columns, rows, and row models with @tanstack/table-devtools. Load for missing connections, required unique table options.key, target replacement/cleanup, or an explicit request for production Devtools entrypoints.

repo: TanStack/table

人気

GitHubのスター
29k
ランキング
#9839
ライセンス
MIT
更新日
2026/10/21

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル