Langsung ke konten
Skillpedia
Website & UI (frontend)29k · #9823

devtools

Fungsinya

Skill ini menunjukkan cara mendaftarkan tabel React ke panel TanStack Devtools, sehingga pengembang dapat memeriksanya saat membangun. Skill mencakup pengaturan, kunci yang diperlukan, dan pembersihan.

Kapan dipakai

  • ✓Saat tabel React tidak muncul di panel devtools dan Anda perlu memperbaiki pendaftarannya.
  • ✓Saat Anda ingin memeriksa state tabel React saat aplikasi berjalan dalam mode pengembangan.
  • ✓Saat Anda perlu hook devtools mengikuti aturan React, bukan dipanggil secara kondisional.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/TanStack/table/blob/main/packages/react-table-devtools/skills/devtools/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Mengapa tabel React saya tidak tampil di panel TanStack devtools?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill menjelaskan cara memberi tabel kunci unik, memanggil hook pendaftaran tepat setelah tabel dibuat, dan menambahkan satu host devtools di dekat root aplikasi.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.

Pertanyaan umum

Mengapa tabel saya dilewati oleh devtools?

Tabel tanpa kunci dilewati, sehingga skill menyarankan mengatur kunci unik sebelum memanggil hook.

Bisakah saya mengaktifkan atau menonaktifkan pendaftaran devtools?

Bisa. Teruskan opsi enabled ke hook, bukan hanya memanggilnya di dalam cabang if.

Di mana host devtools sebaiknya diletakkan?

Di dekat root aplikasi, sekali, dengan plugin devtools tabel ditambahkan ke dalamnya.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
29k
Peringkat
#9823
Lisensi
MIT
Diperbarui
21/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa