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

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.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/table-core/skills/core/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

“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, and columns stable 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 createColumnHelper and helper.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; extracting const { getValue } = row loses its this receiver.
  • 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

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ự