table-state
यह क्या करती है
यह स्किल समझाती है कि Preact component में टेबल की सेटिंग, जैसे मौजूदा पेज, कैसे रखें और टेबल उन्हें कैसे पढ़ती है। यह उन Preact डेवलपरों के लिए है जिनका व्यू टेबल की स्थिति से मेल खाना चाहिए।
कब इस्तेमाल करें
- ✓जब Preact component को मौजूदा पेज या टेबल की कोई और सेटिंग दिखानी हो।
- ✓जब आपको अपने component से टेबल को कोई सेटिंग देनी हो।
- ✓जब टेबल की सेटिंग बदलने के बाद Preact व्यू अपडेट न हो।
Skill का लिंक
https://github.com/TanStack/table/blob/main/packages/preact-table/skills/table-state/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“अगला पेज बटन क्लिक होने के बाद मेरी Preact टेबल में पेज नंबर कैसे अपडेट करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह दिखाती है कि सेटिंग को state hook से कैसे रखें, मेल खाते update callback के साथ टेबल को दें, और चुनी गई state पढ़ें ताकि व्यू फिर से रेंडर हो।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Preact table state
Before starting, run intent load @tanstack/table-core#table-state for shared ownership, initialization, updates, and resets. State repair does not require loading setup guidance.
Read reactive state
useTable selects all registered state by default. Its optional second-argument selector controls rerenders and the shape of table.state. table.atoms.<slice>.get() and table.store.state are current snapshots, not Preact subscriptions.
Use selected table.state in the owner render. For narrower boundaries, use table.Subscribe or useSelector from @tanstack/preact-store. Without source, table.Subscribe selects from table.store; with source, it subscribes to that atom or store. Start with the default selector until render cost requires narrowing.
Control a slice
Keep features, columns, and data stable. Register the feature that owns the controlled slice. This example controls pagination without adding client row processing:
import { useState } from 'preact/hooks'
import {
rowPaginationFeature,
tableFeatures,
useTable,
type PaginationState,
} from '@tanstack/preact-table'
const features = tableFeatures({ rowPaginationFeature })
const columns = [{ accessorKey: 'name' }]
const data = [{ name: 'Ada' }]
export function PageControl() {
const [pagination, setPagination] = useState<PaginationState>({
pageIndex: 0,
pageSize: 20,
})
const table = useTable({
features,
columns,
data,
state: { pagination },
onPaginationChange: setPagination,
})
return (
<button onClick={() => table.setPageSize(50)}>
{table.state.pagination.pageSize} rows per page
</button>
)
}
The Preact setter accepts both a value and a functional updater. Supply the current state.pagination together with onPaginationChange; a callback alone does not keep the table synchronized.
For an externally owned atom, create it with useCreateAtom from @tanstack/preact-store, pass it in atoms.<slice>, and subscribe with useSelector where other UI needs its value.
Reactive boundaries
Use native @tanstack/preact-store bindings. A narrowed selector must include every state slice used by rendered builder methods, or those consumers need their own subscription.
For external-atom examples, selector dependencies, or fine-grained boundaries, 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/preact-table/dist/useTable.d.ts and Subscribe.d.ts, plus the installed @tanstack/preact-store declarations for atom hooks.
अक्सर पूछे जाने वाले सवाल
click handler के अंदर मान पढ़ने से व्यू क्यों ताज़ा नहीं होता?
handlers में पढ़े मान उसी क्षण के स्नैपशॉट होते हैं, इसलिए व्यू सिर्फ़ चुनी गई state या subscription से ताज़ा होता है।
क्या मुझे मान के साथ callback भी देना होगा?
हाँ। स्किल कहती है कि हर नियंत्रित मान को उसके callback के साथ जोड़ें, ताकि बदलाव component तक वापस पहुँचें।
क्या मैं टेबल के किन हिस्सों को दोबारा रेंडर करना है यह सीमित कर सकता हूँ?
हाँ। गाइड संकरी subscriptions का वर्णन करती है, पर रेंडरिंग का खर्च बढ़ने तक डिफ़ॉल्ट रखने की सलाह देती है।
जानकारी
लेखक का मूल विवरण
Read and control Table v9 state in preact. Use for tracked reads, subscriptions, controlled slices, and framework-specific reactive boundaries.
repo: TanStack/table
लोकप्रियता
- GitHub स्टार
- 29k
- रैंकिंग में स्थान
- #9822
- लाइसेंस
- MIT
- अपडेट की गई
- 21/10/2026
कमेंट
- …
इस repository की और skills
getting-started
29kयह आपके एजेंट को Alpine.js में TanStack Table से डेटा टेबल बनाना और दिखाना सिखाती है, जिसमें सेटअप, रिएक्टिव डेटा और पंक्तियाँ दिखाना शामिल है।
table-state
29kयह आपके एजेंट को Alpine.js में टेबल की स्थिति, जैसे मौजूदा पेज, पढ़ना और नियंत्रित करना सिखाती है, ताकि वह स्थिति बदलने पर स्क्रीन अपडेट हो।
devtools
29kयह आपके एजेंट को Angular टेबल को TanStack Devtools पैनल में रजिस्टर करना सिखाती है, ताकि डेवलपर ऐप बनाते समय हर टेबल की जांच कर सकें।
getting-started
29kयह आपके एजेंट को Angular में TanStack टेबल बनाना और दिखाना सिखाती है, जिसमें injectTable सेटअप, टेम्प्लेट रेंडरिंग और पंक्ति डेटा के अपडेट शामिल हैं।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।