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

devtools

できること

SolidのテーブルをTanStack Devtoolsのパネルに登録し、開発中に調べられるようにする方法を説明します。設定、必要なキー、後片付けを扱います。

使う場面

  • ✓Solidのテーブルがデバッグパネルに表示されず、登録を直す必要があるとき。
  • ✓開発中にSolidテーブルの状態を調べたいとき。
  • ✓特定のテーブルについて、Devtoolsへの登録をオンまたはオフにしたいとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“開発中にSolidのテーブルをTanStack Devtoolsのパネルで見るには、どうすればよいか教えてください。”

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

仕組み

コンポーネント内で一意のキーを付けてテーブルを作成し、そこで登録用フックを呼び出し、アプリのルート近くにDevtoolsのホストを1つ追加する方法を説明します。

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

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

This skill builds on @tanstack/table-core#core and @tanstack/table-devtools#devtools.

Setup

import { TanStackDevtools } from '@tanstack/solid-devtools'
import { createTable, tableFeatures } from '@tanstack/solid-table'
import {
  tableDevtoolsPlugin,
  useTanStackTableDevtools,
} from '@tanstack/solid-table-devtools'

const features = tableFeatures({})

export function App() {
  const table = createTable({
    key: 'users-table',
    features,
    columns: [],
    data: [],
  })
  useTanStackTableDevtools(table)
  return <TanStackDevtools plugins={[tableDevtoolsPlugin()]} />
}

Hooks and Components

Register inside the component's Solid owner. Pass { enabled } to the hook for conditional registration.

Common Mistakes

HIGH Registration created outside an owner

Wrong: call the Solid registration hook at module scope.

Correct: call it in the component that owns the table.

The hook uses Solid reactive cleanup to unregister the target.

Source: TanStack/table:packages/solid-table-devtools/src/useTanStackTableDevtools.ts

HIGH Missing or reused table key

Wrong: omit options.key or share one key between mounted tables.

Correct: assign a stable unique key per live table.

The target registry skips missing keys and replaces duplicate identities.

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

MEDIUM Production entrypoint assumed active

Wrong: expect normal Devtools exports to inspect a production table.

Correct: keep default guidance development-only; use /production only on explicit request.

The package index selects no-op implementations outside development.

Source: TanStack/table:packages/solid-table-devtools/src/index.ts

API Discovery

Inspect node_modules/@tanstack/solid-table-devtools/dist/index.d.ts, useTanStackTableDevtools.d.ts, and production.d.ts.

よくある質問

登録用フックはどこで呼び出せばよいですか?

モジュールのトップレベルではなく、テーブルを持つコンポーネントの中で呼び出してください。そうすればSolidが登録を正しく後片付けできます。

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

キーがないテーブルは対象外になるため、生きている各テーブルに安定した一意のキーが必要です。

一部の場合だけ有効にできますか?

はい。フックにenabledオプションを渡すと、条件付きで登録できます。

詳細

作者による元の説明

Connect Solid Table v9 instances to Devtools with tableDevtoolsPlugin and useTanStackTableDevtools in the proper reactive owner. Load for missing targets, required options.key, enabled state, cleanup, or development versus explicit production exports.

repo: TanStack/table

人気

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

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

0

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

コメント

  • …

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

似ているスキル