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

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 Preact 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 một danh sách kiểm tra rõ ràng cho mã đã thay đổi.

Khi nào nên dùng

  • ✓Khi ứng dụng Preact của bạn vẫn import hook bảng kiểu React cũ và cần được cập nhật.
  • ✓Khi bạn đang nâng cấp một dự án Preact, vốn cần Preact 10 trở lên cho Table v9.
  • ✓Khi state hoặc 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/preact-table/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/preact-table/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

“Ứng dụng Preact 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 mã đã thay đổi và chỉ đến các ghi chú tham chiếu chi tiết cho từng thay đổi, để không bỏ sót các bước quan trọ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.

Preact 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 Preact-specific changes.

Framework prerequisite: Preact 10 or newer (preact >=10).

Adapter audit

  • Replace React-adapter imports and useReactTable with native @tanstack/preact-table and useTable.
  • Remove compat aliases that existed only for Table. Preserve aliases still required by other libraries, including a React Virtual integration.
  • Keep model inputs stable and configure explicit features/row-model slots; complete the shared core checklist.
  • Use selected table.state, table.Subscribe, or Preact Store subscriptions; snapshots alone do not rerender consumers.
  • Pair controlled slices with callbacks, or supply stable atoms from @tanstack/preact-store; remove global onStateChange.
  • Use native Preact FlexRender components. Adopt tableOptions or createTableHook only for repeated app conventions.

Load the affected details

When the audit finds old Preact 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 stockFeatures when the target is explicit feature tree-shaking.

API discovery

Inspect node_modules/@tanstack/preact-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 Preact nào?

Skill cho biết cần Preact 10 trở lên cho Table v9.

Skill có xóa mã tương thích cũ không?

Skill yêu cầu xóa các alias chỉ tồn tại vì bảng, nhưng giữ lại những alias mà thư viện khác vẫn cần.

Danh sách kiểm tra này có bao quát mọi thay đổi không?

Không. Nó bao quát các thay đổi riêng của Preact và yêu cầu bạn làm theo danh sách kiểm tra di chuyển cốt lõi dùng chung.

Chi tiết

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

Migrate preact 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
#9821
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ự