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

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 Svelte 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 phần thiết lập, state và mã hiển thị đã thay đổi.

Khi nào nên dùng

  • ✓Khi ứng dụng Svelte của bạn vẫn dùng hàm createSvelteTable cũ và cần được cập nhật.
  • ✓Khi các component Svelte của bạn đang ở phiên bản 3 hoặc 4 và phải chuyển lên Svelte 5 trước khi dùng Table v9.
  • ✓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/svelte-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/svelte-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 Svelte của tôi dùng TanStack Table v8 và các component Svelte cũ. Bạn có thể giúp tôi nâng cấp 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 gồm việc chuyển sang Svelte 5, thiết lập createTable và các thay đổi hiển thị, cùng 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.

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

Framework prerequisite: Svelte 5 (svelte ^5.0.0); migrate Svelte 3/4 components before Table.

Adapter audit

  • Upgrade to Svelte 5 and replace old writable-store table setup with runes/getters.
  • Replace createSvelteTable with createTable; preserve changing data and controlled slices through getters.
  • Configure explicit features/row-model slots and complete the shared core checklist.
  • Remove creation selectors, selected table.state, subscribeTable, and SubscribeSource from earlier v9 code.
  • Update SvelteTable to two generic parameters and AppSvelteTable to five; remove selected-state generics from useTableContext.
  • Read atoms/store in templates or tracked runes. Use per-slice updater callbacks, createTableState, or external Svelte Store atoms instead of global onStateChange.
  • Render with FlexRender, renderComponent, or renderSnippet. Use the shipped rune-aware createTableHook only for repeated conventions.

Load the affected details

When the audit finds old Svelte 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 createSvelteTable 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/svelte-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

Tôi có phải nâng cấp Svelte trước không?

Có. Skill nói Svelte 5 là bắt buộc, nên các component Svelte 3 hoặc 4 cần được chuyển trước.

Cái gì thay thế cách thiết lập writable store cũ?

Skill nói nên dùng runes và getter thay thế.

Hướng dẫn này có bao quát mọi thay đổi của thư viện không?

Không. Nó chỉ bao quát các thay đổi riêng cho Svelte 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 svelte 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
#9832
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ự