core
Skill này làm gì
Skill này giải thích nền tảng dùng chung của TanStack Table, thư viện quản lý state của bảng và xử lý dòng. Skill dành cho lập trình viên cần hiểu mô hình lõi trước khi dùng adapter cho một framework.
Khi nào nên dùng
- ✓Khi bạn bắt đầu một bảng mới và cần biết mô hình lõi và đầu vào ổn định hoạt động ra sao.
- ✓Khi bạn cần kiểm tra xem một tính năng tùy chọn của bảng có sẵn không trước khi dùng.
- ✓Khi bạn đang viết một tích hợp không dùng framework cụ thể nào.
Liên kết skill
https://github.com/TanStack/table/blob/main/packages/table-core/skills/core/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
“Trước khi xây bảng của tôi, bạn có thể giải thích cách TanStack Table v9 xử lý dữ liệu và cột không?”
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 thư viện điều phối state và xử lý dòng, còn mã của bạn kiểm soát markup, và đưa ra một ví dụ tối giản tạo bảng rồi đọc các dòng của 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.
TanStack Table core
TanStack Table coordinates state and row processing. The renderer owns markup, styles, semantics, and interaction accessibility. Use the installed framework adapter in UI code; use constructTable for framework-neutral integrations.
Minimal setup
<!-- skill-snippet:check -->import {
constructTable,
createColumnHelper,
tableFeatures,
} from '@tanstack/table-core'
import { storeReactivityBindings } from '@tanstack/table-core/store-reactivity-bindings'
type Person = { id: string; name: string }
const features = tableFeatures({
coreReactivityFeature: storeReactivityBindings(),
})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])
const data: Person[] = [{ id: '1', name: 'Ada' }]
const table = constructTable({
features,
columns,
data,
getRowId: (row) => row.id,
})
for (const row of table.getRowModel().rows) {
console.log(row.getAllCells().map((cell) => cell.getValue()))
}
Essential constraints
- The core row model is automatic. Optional APIs and state exist only after their feature is registered.
- Keep
features,data, andcolumnsstable between meaningful changes. Derive changing arrays with the adapter's memo/computed mechanism; an inline.map(),.filter(), column factory, or fresh[]fallback invalidates model work and can cause render loops. - Let
createColumnHelperandhelper.columns()preserve accessor value types. Derive feature types from the concrete registry when an explicit boundary is needed. - Call row, cell, column, and header methods on their instance. Use
row.getValue('name')or a callback that calls it; extractingconst { getValue } = rowloses itsthisreceiver. - Render the final
table.getRowModel().rows. The table object itself is not a DOM component.
Read for the current task
| Task | Read |
|---|---|
| Add or repair optional features, processing slots, or prerequisites | Feature architecture, then its relevant feature reference |
| Choose state ownership, initialize or reset state | Shared state |
Fix ColumnDef inference, reusable options, or scoped meta |
TypeScript inference |
| Diagnose a missing export, option, state slice, or instance method | API discovery |
| Implement row numbers, identity, or display-index behavior | Rows |
| Author behavior beyond built-ins or typed meta | Custom features |
| Migrate an existing v8 table | Migration audit |
For framework construction and rendering, load the installed package's getting-started skill with intent load <package>#getting-started, replacing <package> with the actual adapter package, such as @tanstack/react-table. For reactive reads or controlled wiring, load that package's table-state skill directly.
Installed API discovery
Start at node_modules/@tanstack/table-core/dist/index.d.ts and follow exported declarations. Adapter declaration layouts and missing-API diagnosis are in API discovery; read it when the expected export or declaration path is absent.
Câu hỏi thường gặp
Vì sao dữ liệu và cột phải ổn định?
Skill nói việc thay đổi chúng trong mỗi lần render sẽ làm mất hiệu lực công việc của mô hình, nên các mảng thay đổi nên được dẫn xuất bằng memo hoặc computed của adapter.
Thư viện có tự vẽ bảng cho tôi không?
Không. Skill nói renderer sở hữu markup, kiểu dáng và ngữ nghĩa, còn thư viện quản lý state và dòng.
Mọi tính năng của bảng có được bật mặc định không?
Không. Các API và state tùy chọn chỉ tồn tại sau khi tính năng tương ứng được đăng ký.
Chi tiết
Mô tả gốc của tác giả
Use TanStack Table v9 core architecture, stable data and columns, and inferred types. Route setup, missing APIs, row models, state, features, and framework-specific work.
repo: TanStack/table
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9834
- 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.