devtools
Skill này làm gì
Skill này giải thích cách kết nối các instance TanStack Table với bảng Devtools, để lập trình viên có thể kiểm tra options, state và dòng của chúng. Skill bao gồm bước đăng ký chung dùng cho nhiều framework.
Khi nào nên dùng
- ✓Khi một bảng không hiện trong bảng devtools và bạn cần sửa kết nối.
- ✓Khi bạn cần kiểm tra state và dòng của bảng trong lúc phát triển với một framework được hỗ trợ.
- ✓Khi bạn muốn đảm bảo devtools chỉ chạy trong bản build phát triển.
Liên kết skill
https://github.com/TanStack/table/blob/main/packages/table-devtools/skills/devtools/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm sao để đăng ký bảng TanStack của tôi với devtools để xem các dòng và state?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích rằng mỗi bảng cần một key duy nhất, các hook của framework tự xử lý việc đăng ký cho bạn, và các điểm vào devtools mặc định không làm gì ngoài môi trường phát triển.
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.
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.
Câu hỏi thường gặp
Vì sao bảng của tôi không hiện ra?
Skill nói các bảng thiếu key hoặc key để trống sẽ bị bỏ qua, nên mỗi bảng cần một key duy nhất.
Tôi có dùng devtools trên production không?
Chỉ khi bạn chọn điểm vào production rõ ràng, điều này kéo theo các hệ quả về bảo mật và kích thước bundle.
Tôi có cần tự gọi hàm đăng ký không?
Thường là không. Hook hoặc injector của framework tự xử lý việc đăng ký và dọn dẹp, còn hàm thô chỉ dành cho framework chưa được hỗ trợ.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9839
- Giấy phép
- MIT
- Cập nhật
- 21/10/2026
Bình luận
- …
Thêm skill từ kho mã này
getting-started
29kHướng dẫn agent của bạn cách tạo và hiển thị bảng dữ liệu với TanStack Table trong Alpine.js, gồm thiết lập, dữ liệu phản ứng và hiển thị các hàng.
table-state
29kHướng dẫn agent của bạn cách đọc và điều khiển trạng thái bảng trong Alpine.js, như trang hiện tại, để màn hình cập nhật khi trạng thái đó thay đổi.
devtools
29kHướng dẫn agent của bạn cách đăng ký bảng Angular với bảng điều khiển TanStack Devtools, để lập trình viên có thể kiểm tra từng bảng trong khi xây dựng ứng dụng.
getting-started
29kHướng dẫn agent của bạn cách tạo và hiển thị bảng TanStack trong Angular, gồm thiết lập injectTable, hiển thị trong template và cập nhật dữ liệu hàng.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.