Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)29k · #9827

devtools

Skill này làm gì

Skill này chỉ cách đăng ký bảng Solid với bảng TanStack Devtools, để lập trình viên có thể kiểm tra chúng khi đang phát triển. Skill bao gồm thiết lập, các key bắt buộc và việc dọn dẹp.

Khi nào nên dùng

  • ✓Khi một bảng Solid không hiện trong bảng devtools và bạn cần sửa việc đăng ký của nó.
  • ✓Khi bạn muốn kiểm tra state của bảng Solid trong lúc ứng dụng chạy ở chế độ phát triển.
  • ✓Khi bạn muốn bật hoặc tắt việc đăng ký devtools cho một bảng cụ thể.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/TanStack/table/blob/main/packages/solid-table-devtools/skills/devtools/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm sao để tôi xem bảng Solid của mình trong bảng TanStack devtools khi đang phát triển?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill giải thích cách tạo bảng với một key duy nhất bên trong component, gọi hook đăng ký ở đó và thêm một devtools host gần gốc của ứng dụng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.

Câu hỏi thường gặp

Tôi nên gọi hook đăng ký ở đâu?

Bên trong component sở hữu bảng, không phải ở phạm vi module, để Solid có thể dọn dẹp việc đăng ký đúng cách.

Vì sao bảng của tôi không được liệt kê?

Các bảng không có key sẽ bị bỏ qua, nên mỗi bảng đang chạy cần một key duy nhất và ổn định.

Tôi có thể chỉ bật trong một số trường hợp không?

Được. Truyền tùy chọn enabled vào hook để đăng ký có điều kiện.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9827
Giấy phép
MIT
Cập nhật
21/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự