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

migrate-v8-to-v9

Skill này làm gì

Hướng dẫn dùng chung này giúp cập nhật một dự án TanStack Table từ phiên bản 8 lên phiên bản 9 trên nhiều framework. Hướng dẫn dành cho lập trình viên cần tìm mọi API bị ảnh hưởng trước khi sửa mã.

Khi nào nên dùng

  • ✓Khi bạn cần liệt kê những phần nào của bảng hiện có dùng API đã thay đổi trong v9.
  • ✓Khi bạn đang nâng cấp bảng và muốn các bài test và kiểm tra kiểu xác nhận hành vi được giữ nguyên.
  • ✓Khi bạn không chắc hướng dẫn chuyển đổi framework nào áp dụng cho dự án của mình.

Liên kết skill

https://github.com/TanStack/table/blob/main/packages/table-core/skills/migrate-v8-to-v9/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/migrate-v8-to-v9/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

“Bạn có thể xem qua mã TanStack Table hiện tại của tôi và liệt kê mọi thứ cần thay đổi cho v9 không?”

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

Cách hoạt động

Skill yêu cầu agent kiểm kê các option, import và state của bảng, đối chiếu từng mục với danh sách kiểm tra dùng chung, rồi đọc các ghi chú tham chiếu chi tiết phù hợp.

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.

Migrate Table v8 to v9

Read core first. Audit every item below before choosing detailed mappings. This shared checklist owns the complete core migration; the installed adapter's migration skill owns construction, rendering, framework requirements, and reactive wiring.

Procedure

  1. Establish passing tests for the existing table and inventory its enabled interactions, imports, options, and state owners.
  2. Follow the whole audit checklist. Read a mapping reference when the audit finds affected code; preserve behavior while migrating features and construction.
  3. Load the installed adapter with intent load <package>#migrate-v8-to-v9 and its table-state skill. Substitute the actual adapter package. React, Preact, Solid, Svelte, Vue, Angular, and Lit have migration skills; Alpine, Ember, and Octane have no v8 adapter migration journey.
  4. Type-check, exercise every enabled interaction and client/server stage, and complete the explicit v9 setup.

Treat useLegacyTable as a deprecated React-only bridge for an existing incremental migration. It bundles every feature, can exceed the v8 bundle, and is not the target architecture. Its only entrypoint is @tanstack/react-table/legacy.

Read mappings for affected code

Audit finds Read
Feature registration, row-model factories, function slots, bound methods, or consumed internals Architecture mappings
getState, onStateChange, controlled ownership, observation, or reset changes State mappings
Aggregation, logical pinning, sizing/resizing, sorting names, or selection predicates Feature API mappings
Explicit generics, column helpers, scoped meta, registry augmentation, or RowData TypeScript mappings

Complete audit checklist

  • Load the installed framework adapter's migration and table-state skills.
  • Replace the v8 adapter constructor/hook/controller with its v9 entrypoint.
  • Add a stable features object to every table.
  • Inventory every feature API used by table, row, column, cell, and header code; register each stock feature the table actually uses.
  • Use stockFeatures only as a temporary parity aid and record an explicit-feature follow-up.
  • Remove getCoreRowModel() unless supplying a deliberate custom coreRowModel slot.
  • Move all remaining get*RowModel() options (or a removed rowModels: {...} object, if present) to create*RowModel() feature slots.
  • Register each dependent feature before its row-model slot.
  • Move filterFns, sortingFns/sortFns, and aggregationFns into feature slots, registering individually imported built-ins; pass no registries to factories.
  • Register rowAggregationFeature independently and migrate custom aggregation callables to context-based AggregationFnDef definitions.
  • Register columnFilteringFeature before global filtering and filter/facet dependencies.
  • Register columnSizingFeature before columnResizingFeature.
  • Replace table.getState() and top-level onStateChange according to the adapter state guide.
  • Verify every controlled slice has an update path; verify externally owned atoms are reset by their owner.
  • Audit destructured, spread, serialized, or bare-callback instance methods.
  • Replace every column-pinning left/right key, argument, comparison, method family, and sticky CSS declaration with logical start/end equivalents.
  • Split table-level enablePinning; preserve column-def enablePinning where intended.
  • Split sizing/resizing features and rename the resizing state, setter, and callback.
  • Replace every sortingFn/SortingFn/sortingFns spelling with its v9 sort* spelling.
  • Remove every consumed underscore-prefixed internal API.
  • Recheck indeterminate selection logic against the new "at least one" semantics.
  • Add TFeatures to unavoidable explicit core types, helpers, and retained meta augmentation; otherwise restore inference.
  • Replace function-registry and filter-meta declaratio
Câu hỏi thường gặp

Tôi có nên viết test trước khi chuyển không?

Có. Skill nói nên thiết lập các test đang pass cho bảng hiện có trước khi thay đổi nó.

useLegacyTable có phải là lựa chọn lâu dài tốt không?

Không. Skill gọi nó là cầu nối chỉ dành cho React, đã bị loại bỏ, dùng để chuyển dần, không phải thiết lập đích.

Những framework nào có hướng dẫn chuyển đổi?

Skill liệt kê hướng dẫn cho React, Preact, Solid, Svelte, Vue, Angular và Lit. Alpine, Ember và Octane không có hướng dẫn chuyển từ v8.

Chi tiết

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

Audit and migrate Table v8 to v9. Inventory affected APIs, follow the shared checklist, and read only the required architecture, state, feature, and TypeScript mappings.

repo: TanStack/table

Độ phổ biến

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