table-state
Skill này làm gì
Skill này giải thích cách các thiết lập của bảng, như trang hiện tại, hoạt động trong ứng dụng Solid. Skill dành cho lập trình viên Solid cần bảng và các component của mình phản ứng với cùng một giá trị.
Khi nào nên dùng
- ✓Khi một template Solid cần hiển thị trang hiện tại hoặc một thiết lập khác của bảng.
- ✓Khi bạn cần nối một thiết lập của bảng với một signal hoặc memo của Solid.
- ✓Khi một giá trị đọc trong thân component không cập nhật sau khi bảng thay đổi.
Liên kết skill
https://github.com/TanStack/table/blob/main/packages/solid-table/skills/table-state/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
“Làm sao để hiển thị số trang hiện tại của bảng Solid trong nhãn nút và luôn giữ nó được cập nhật?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill chỉ cách đọc các atom của bảng bên trong JSX, memo hoặc effect, nơi Solid theo dõi chúng, và cách truyền các signal được điều khiển với setter nhận hàm cập nhật.
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.
Solid table state
Before starting, run intent load @tanstack/table-core#table-state for shared ownership, initialization, updates, and resets.
Read reactive state
The adapter backs table atoms with Solid signals and memos. Read table.atoms.<slice>.get() inside JSX, createMemo, createEffect, or another tracked scope. A value captured once outside tracking is only a snapshot. Solid has no React-style selected table.state.
table.Subscribe is deprecated and adds no subscription or tracking scope. Read table.atoms directly inside JSX, memos, or effects. Component bodies are untracked; keep reads inside tracked scopes. Track the required atoms instead of adding whole-store forced rerenders.
Control a slice
Keep features and columns stable. Expose changing data and controlled state through getters. Solid setters already accept Table's raw values and updater functions:
import { createMemo, createSignal } from 'solid-js'
import {
createTable,
rowPaginationFeature,
tableFeatures,
type PaginationState,
} from '@tanstack/solid-table'
const features = tableFeatures({ rowPaginationFeature })
const columns = [{ accessorKey: 'name' }]
export function PageControl() {
const [data] = createSignal([{ name: 'Ada' }])
const [pagination, setPagination] = createSignal<PaginationState>({
pageIndex: 0,
pageSize: 20,
})
const table = createTable({
features,
columns,
get data() {
return data()
},
state: {
get pagination() {
return pagination()
},
},
onPaginationChange: setPagination,
})
const pageSize = createMemo(() => table.atoms.pagination.get().pageSize)
return (
<button onClick={() => table.setPageSize(50)}>
{pageSize()} rows per page
</button>
)
}
When wrapping a setter to add a side effect, resolve both updater forms before storing the result. For shared atom ownership, use createAtom from @tanstack/solid-store and pass it in atoms.<slice>.
For external atoms, custom updater wrappers, or tracking failures, read reactivity details. If this task changes processing features, run intent load @tanstack/table-core#table-features and read the relevant feature references.
API discovery
Inspect node_modules/@tanstack/solid-table/dist/createTable.d.ts and reactivity.d.ts; inspect @tanstack/solid-store declarations for external atoms.
Câu hỏi thường gặp
Vì sao đọc một giá trị trong thân component không cập nhật?
Solid không theo dõi các lần đọc trong thân component, nên giá trị ở đó chỉ là một bản chụp.
Có còn cần component Subscribe của bảng không?
Không. Skill nói nó đã bị loại bỏ và việc đọc trực tiếp các atom của bảng trong JSX, memo hoặc effect là cách thay thế.
Setter có nhận hàm cập nhật không?
Có. Setter của Solid nhận cả giá trị thường lẫn hàm cập nhật, đúng như bảng yêu cầu.
Chi tiết
Mô tả gốc của tác giả
Read and control Table v9 state in solid. Use for tracked reads, subscriptions, controlled slices, and framework-specific reactive boundaries.
repo: TanStack/table
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9830
- 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.