table-state
यह क्या करती है
यह स्किल तय करने में मदद करती है कि स्थिति का हर हिस्सा, जैसे पेजिनेशन, टेबल संभाले या आपका अपना कोड। यह उन डेवलपरों के लिए है जिन्हें टेबल और ऐप को उन मानों पर सहमत रखना है।
कब इस्तेमाल करें
- ✓जब आप टेबल को शुरुआती स्थिति, जैसे पेज साइज़, देना चाहें बिना उसका नियंत्रण लिए।
- ✓जब आपको किसी स्थिति के हिस्से को खुद नियंत्रित करना हो और उसके बदलाव टेबल तक वापस भेजने हों।
- ✓जब टेबल की स्थिति में बदलाव आपकी अपेक्षा के अनुसार सहेजा या रीसेट न हो।
Skill का लिंक
https://github.com/TanStack/table/blob/main/packages/table-core/skills/table-state/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं अपनी टेबल को 25 के पेज साइज़ से शुरू करना चाहता हूँ, फिर भी वह पेज अपने-आप बदल सके। यह कैसे करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह दिखाती है कि टेबल के अपने संभाले हिस्सों के लिए प्रारंभिक मान कैसे दें, नियंत्रित हिस्सों को मान और बदलाव callback दोनों कैसे मिलें, और टेबल के अपने फ़ंक्शन से स्थिति कैसे रीसेट करें।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Shared table state
Read core first for stable model inputs and feature-gated types. State repair in an existing table can start here without adapter setup guidance.
Start with internal ownership
Omit state, atoms, and on<Slice>Change for slices that Table should own. Use initialState only to customize their initial values.
import {
constructTable,
createColumnHelper,
rowPaginationFeature,
tableFeatures,
} from '@tanstack/table-core'
import { storeReactivityBindings } from '@tanstack/table-core/store-reactivity-bindings'
type Person = { id: string; name: string }
const features = tableFeatures({
coreReactivityFeature: storeReactivityBindings(),
rowPaginationFeature,
})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([helper.accessor('name', {})])
const data: Person[] = [{ id: '1', name: 'Ada' }]
const table = constructTable({
features,
columns,
data,
initialState: { pagination: { pageIndex: 0, pageSize: 25 } },
})
table.setPageSize(50)
console.log(table.atoms.pagination.get().pageSize)
table.resetPagination()
console.log(table.atoms.pagination.get().pageSize)
This example demonstrates state only. A pagination row-model slot is needed when Table should also slice the data.
Choose one owner per slice
| Owner | Configuration | Update path |
|---|---|---|
| Table | Omit external values; optionally provide initialState.<slice> |
Feature setter or interaction handler |
| Framework state | Current state.<slice> plus matching on<Slice>Change |
Callback applies the updater and the adapter receives the fresh value |
| External atom | Stable writable atoms.<slice> |
Feature setters write directly to that atom; no matching callback is needed |
Prefer the smallest set of externally owned slices. Load the adapter's table-state skill before selecting framework state or an external atom package. Native signals, runes, refs, tracked properties, and Store atoms have different adapter wiring.
An updater can be a value or a function of the previous value. In a custom callback, use functionalUpdate(updater, previousValue) from @tanstack/table-core and write the result to the owner. Supplying only on<Slice>Change replaces the internal updater without returning a current controlled value; supplying only state.<slice> leaves no effective external update path.
If both atoms.<slice> and state.<slice> are supplied, the external atom wins. Choose one owner deliberately; writing an internal base atom cannot change a slice resolved from an external atom.
Distinguish state reads and writes
table.baseAtomscontains internal writable atoms created from resolved initial state. Prefer feature setters; direct base-atom writes bypass feature-specific behavior.table.atomscontains readonly resolved atoms per registered slice.table.atoms.pagination.get()reads whichever owner supplies pagination.table.storeis the readonly flat combination of resolved slices.table.store.statereads its current snapshot.table.state, where an adapter exposes it, is adapter-selected state. Its presence and subscription behavior are not shared core contracts.
A feature must be registered before its state appears in initialState, state, atoms, baseAtoms, or store. Let the concrete feature registry infer TableState; import a slice type such as PaginationState for an external owner instead of widening the complete state.
A direct atom/store read is not a portable framework subscription. Its tracking depends on the adapter and the scope of the read. For reactive UI, load intent load <package>#table-state using the installed adapter package, for example intent load @tanstack/react-table#table-state. Use that skill's supported read and subscription APIs.
Initialization and resets
initialState resolves at construction. Changing the supplied object later does not reset the table. Keep the registered features and external atom identities stable for the instance lifetime.
Feature resets such as `r
अक्सर पूछे जाने वाले सवाल
क्या मुझे हमेशा स्थिति खुद नियंत्रित करनी होगी?
नहीं। स्किल कहती है कि जिस हिस्से को टेबल संभाले, उसकी state न दें, और initialState सिर्फ़ शुरुआती मानों के लिए इस्तेमाल करें।
क्या एक state हिस्से के दो मालिक हो सकते हैं?
नहीं। स्किल कहती है कि हर हिस्से का एक ही मालिक चुनें।
क्या यह स्किल हर framework की reactive reads कवर करती है?
नहीं। यह साझा मालिकाना नियम कवर करती है और reactive reads के लिए adapter की state स्किल की ओर इशारा करती है।
जानकारी
लेखक का मूल विवरण
Choose Table v9 state ownership, atoms, initialization, updates, and resets. Load for controlled slices or state coordination; use the adapter state skill for reactive reads.
repo: TanStack/table
लोकप्रियता
- GitHub स्टार
- 29k
- रैंकिंग में स्थान
- #9838
- लाइसेंस
- 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 फॉलो करवाता है।