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

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 Lit 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 từng phần mã đã thay đổi.

Khi nào nên dùng

  • ✓Khi ứng dụng Lit của bạn vẫn dùng controller bảng v8 và cần được cập nhật.
  • ✓Khi bạn đang chuẩn bị một dự án Lit cho TanStack Table v9 và phiên bản Lit bắt buộc của nó.
  • ✓Khi hiển thị hoặc trạng thái bảng bị lỗi sau khi bạn nâng cấp lên Table v9.

Liên kết skill

https://github.com/TanStack/table/blob/main/packages/lit-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/lit-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

“Bạn có thể giúp tôi nâng cấp mã bảng Lit từ TanStack Table v8 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 danh sách kiểm tra các thay đổi, chẳng hạn chuyển sang lời gọi bảng mới hơn trong lúc render, và liên kết đến 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.

Load intent load @tanstack/table-core#migrate-v8-to-v9 first and audit its entire shared checklist. It owns feature registration, row-model slots, state/reset changes, prototype methods, logical pinning, sizing/resizing, sorting, selection, helpers, and TypeScript mappings.

Framework prerequisites

Lit 3.1.3 or newer within v3 (lit ^3.1.3) and @lit/context ^1.1.0 are required.

Lit migration checklist

  • Construct one TableController<typeof features, TData>(this) as a stable host field.
  • Replace the v8 controller.table property/options thunk with controller.table(options, selector?) during render.
  • Read selected table.state for rendering; use atom snapshots in handlers or stable table.subscribe selectors for template regions.
  • Feed resolved controlled callbacks back through reactive Lit properties, or use stable external atoms.
  • Switch render helpers to FlexRender({ cell }), FlexRender({ header }), or FlexRender({ footer }) and preserve instance-method receivers.
  • If app conventions repeat, construct a host-bound useAppTable once and call its .table() during render.

Apply the affected mappings

Read adapter-migration when changing construction, rendering, state, or app hooks. Read the relevant core migration references for each affected shared API; this adapter checklist does not replace that audit.

For complete v9 construction examples, read getting-started. For reactive state repairs, read table-state.

Final checks

  • All shared core migration checks and affected mappings have been applied.
  • The framework checklist above passes with the current adapter declarations.
  • Model inputs remain stable and state changes reach their reactive owner.

API discovery

Inspect node_modules/@tanstack/lit-table/dist/index.d.ts, then TableController.d.ts, flexRender.d.ts, or the relevant exported declaration. Core feature APIs are in node_modules/@tanstack/table-core/dist/features/.

Câu hỏi thường gặp

Cần phiên bản Lit nào?

Skill liệt kê Lit 3.1.3 trở lên trong phiên bản 3, cùng với @lit/context 1.1.0 trở lên.

Điều này có thay thế hướng dẫn di chuyển cốt lõi không?

Không. Nó bao quát các thay đổi riêng của Lit và chỉ đến hướng dẫn cốt lõi cho các thay đổi API dùng chung.

Nếu các helper hiển thị của tôi đã cũ thì sao?

Skill yêu cầu chuyển chúng sang FlexRender với một cell, header hoặc footer.

Chi tiết

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

Migrate lit 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
#9814
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ự