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

devtools

Skill này làm gì

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

Khi nào nên dùng

  • ✓Khi một bảng Vue không hiện trong bảng devtools và bạn cần sửa việc đăng ký của nó.
  • ✓Khi bảng trong component Vue của bạn bị thay thế và devtools phải theo dõi bảng mới.
  • ✓Khi bạn muốn devtools chỉ hiện trong bản build phát triển.

Liên kết skill

https://github.com/TanStack/table/blob/main/packages/vue-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/vue-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

“Vì sao bảng Vue của tôi không được liệt kê trong bảng TanStack devtools?”

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, gọi hook đăng ký trong component 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

<script setup lang="ts">
import { useTable, tableFeatures } from '@tanstack/vue-table'
import { useTanStackTableDevtools } from '@tanstack/vue-table-devtools'

const table = useTable({
  key: 'users-table',
  features: tableFeatures({}),
  columns: [],
  data: [],
})

useTanStackTableDevtools(table)
</script>

<template><div>Users table registered</div></template>

Mount the Vue TanStackDevtools host once with tableDevtoolsPlugin({}), following docs/devtools.md.

Hooks and Components

The hook accepts a table or ref-like table and tracks replacement. Keep that reactive wrapper intact rather than unwrapping once.

Common Mistakes

HIGH Ref unwrapped before registration

Wrong: read a ref once and register only that snapshot.

Correct: pass the ref/maybe-ref shape accepted by the hook.

The adapter watches the resolved table and cleans up when it changes.

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

HIGH Missing or duplicate key

Wrong: omit key or reuse a key across mounted tables.

Correct: use one descriptive stable key for each target.

The registry skips keyless tables and replaces duplicate targets.

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

MEDIUM Development gate mistaken for broken plugin

Wrong: expect the default panel/plugin/hook in production.

Correct: keep normal Devtools development-only unless explicitly importing /production.

The package index selects no-op exports outside development.

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

API Discovery

Inspect node_modules/@tanstack/vue-table-devtools/dist/index.d.ts and useTanStackTableDevtools.d.ts for current ref handling.

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

Vì sao tôi phải giữ bảng trong một ref?

Skill nói hook theo dõi việc thay thế, nên nếu unwrap ref một lần thì chỉ đăng ký được một bản chụp.

Vì sao bảng của tôi bị bỏ qua?

Các bảng không có key sẽ bị bỏ qua, và key trùng nhau sẽ ghi đè lẫn nhau, nên mỗi bảng cần key riêng.

Có thể tắt việc đăng ký không?

Được. Hook nhận tùy chọn enabled, nên việc đăng ký có thể được tắt.

Chi tiết

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

Connect Vue Table v9 refs or instances to Devtools with tableDevtoolsPlugin and useTanStackTableDevtools. Load for missing targets, reactive table replacement, required options.key, enabled state, cleanup, or development gating.

repo: TanStack/table

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9840
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ự