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

devtools

できること

このスキルは、Reactの表をTanStack Devtoolsのパネルに登録する方法を示します。開発者は作りながら表を確認できます。設定、必要なキー、後片付けを扱います。

使う場面

  • ✓Reactの表がdevtoolsパネルにない場合に、その登録を直す必要があるとき。
  • ✓開発中にアプリを動かしながら、Reactの表の状態を調べたいとき。
  • ✓devtoolsのフックを、条件分岐で呼ばず、Reactのルールに従わせる必要があるとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“なぜ私のReactの表が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/react-devtools'
import { useTable, tableFeatures } from '@tanstack/react-table'
import {
  tableDevtoolsPlugin,
  useTanStackTableDevtools,
} from '@tanstack/react-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 useTanStackTableDevtools(table, { enabled }) immediately after creating the table. Mount one TanStackDevtools host with tableDevtoolsPlugin() near the application root.

Common Mistakes

HIGH Hook receives a keyless table

Wrong: create the table without key and expect the hook to infer a name.

Correct: set a unique key in table options before calling the hook.

Core target registration skips keyless tables.

Source: TanStack/table:docs/devtools.md

HIGH Hook called conditionally

Wrong: call useTanStackTableDevtools only inside an if branch.

Correct: call it every render and pass { enabled: condition }.

The hook owns React effect registration and cleanup.

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

MEDIUM Default import expected in production

Wrong: expect the normal hook/plugin/panel to inspect production tables.

Correct: keep normal guidance development-only; use the /production entrypoint only when explicitly required.

The default index selects no-op implementations outside development.

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

API Discovery

Inspect node_modules/@tanstack/react-table-devtools/dist/index.d.ts and useTanStackTableDevtools.d.ts for the installed lifecycle API.

よくある質問

なぜdevtoolsに表がスキップされるのですか?

キーのない表はスキップされるので、フックを呼ぶ前に一意のキーを設定するようスキルは述べています。

devtoolsの登録のオン・オフを切り替えられますか?

はい、ifの分岐の中だけで呼ぶのではなく、フックにenabledのオプションを渡してください。

devtoolsのホストはどこに置きますか?

アプリのルートの近くに一度置き、そこに表のdevtoolsのプラグインを追加します。

詳細

作者による元の説明

Connect React Table v9 instances to Devtools with tableDevtoolsPlugin and useTanStackTableDevtools. Load for missing Table panels, registration lifecycle, required options.key, enabled state, or development versus explicit production exports.

repo: TanStack/table

人気

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

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

0

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

コメント

  • …

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

似ているスキル