migrate-v8-to-v9
Skill này làm gì
Skill này hướng dẫn nâng cấp một dự án React từ TanStack Table phiên bản 8 lên phiên bản 9. Skill dành cho lập trình viên cần danh sách kiểm tra cho các hook, state và mã hiển thị đã thay đổi.
Khi nào nên dùng
- ✓Khi ứng dụng React của bạn vẫn gọi hook bảng cũ và cần được cập nhật.
- ✓Khi bạn đang nâng cấp dự án React, vì Table v9 yêu cầu React 18 trở lên.
- ✓Khi state hoặc phần hiển thị bảng bị lỗi sau khi bạn chuyển sang Table v9.
Liên kết skill
https://github.com/TanStack/table/blob/main/packages/react-table/skills/migrate-v8-to-v9/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
“Ứng dụng React của tôi đang dùng TanStack Table v8. Bạn có thể giúp tôi nâng cấp lên v9 không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đưa ra một danh sách kiểm tra các đoạn mã đã thay đổi, chẳng hạn thay hook cũ bằng hook mới, và có liên kết tới ghi chú chi tiết cho từng thay đổi.
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.
React v8-to-v9 migration checklist
Before starting, run intent load @tanstack/table-core#migrate-v8-to-v9. Audit its entire shared checklist and read the detailed core mappings for APIs present in the application. This checklist adds the React-specific changes.
Framework prerequisite: React 18 or newer (react >=18).
Adapter audit
- Replace
useReactTablewithuseTable; remove any temporaryuseLegacyTablefrom@tanstack/react-table/legacy. - Keep model inputs stable and use explicit
tableFeaturesplus its row-model slots. Audit every shared change through the core checklist. - Replace render reads with selected
table.state,table.Subscribe, oruseSelector. Atom/store snapshots alone do not subscribe React. - Pair each controlled
stateslice with its updater callback, or supply a stable React Store atom. Remove the globalonStateChangeoption. - Check compiler-memoized children hiding builder-method reads; subscribe inside the child or pass the selected value to it.
- Use
table.FlexRenderor standaloneFlexRenderwhere appropriate;flexRenderremains supported. - Introduce
tableOptionsorcreateTableHookonly for repeated conventions; preserve app wrapper and typed-context boundaries.
Load the affected details
When the audit finds old React construction, state, rendering, or app-hook code, read adapter migration details before editing it. For a replacement render scaffold, read getting started. For controlled or stale state after migration, read table state.
Shared pinning, sizing, sorting, selection, prototype-method, type, and registry changes stay in the core migration references. Renaming useReactTable alone does not complete the migration.
Verify the migration
- Type-check against the installed v9 adapter and exercise every enabled client/manual feature flow.
- Verify external state writes, reactive data replacement, and the framework rendering paths changed above.
- Complete the core checklist, including layout and selection behavior when those features are used.
- Replace temporary
stockFeatureswhen the target is explicit feature tree-shaking and removeuseLegacyTable.
API discovery
Inspect node_modules/@tanstack/react-table/dist/index.d.ts and the exported adapter declarations. Use node_modules/@tanstack/table-core/dist/index.d.ts for shared APIs.
Câu hỏi thường gặp
Cần phiên bản React nào?
Skill nói Table v9 yêu cầu React 18 trở lên.
Điều gì xảy ra với tùy chọn onStateChange?
Skill nói nên xóa nó và ghép mỗi phần state được điều khiển với callback cập nhật riêng của nó.
Danh sách kiểm tra có bao quát mọi thay đổi API không?
Không. Nó chỉ bao quát các thay đổi riêng cho React và trỏ tới danh sách kiểm tra migration core dùng chung cho phần còn lại.
Chi tiết
Mô tả gốc của tác giả
Migrate react Table v8 to v9. Audit framework construction, rendering, state, and app hooks, with shared API changes in the core migration skill.
repo: TanStack/table
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9825
- 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.