table-state
यह क्या करती है
यह स्किल समझाती है कि टेबल की सेटिंग, जैसे कौन सा पेज दिख रहा है, कैसे ट्रैक करें और Alpine.js पेज में उन्हें कैसे अपडेट करें। यह उन डेवलपरों के लिए है जिन्हें टेबल और बाकी पेज एक-दूसरे के साथ रखने हैं।
कब इस्तेमाल करें
- ✓जब टेबल का मौजूदा पेज या कोई दूसरी सेटिंग किसी बटन या लेबल में दिखानी हो।
- ✓जब आप अपने कोड से टेबल की स्थिति का कोई हिस्सा नियंत्रित करना चाहें।
- ✓जब स्थिति बदलने के बाद टेबल स्क्रीन पर अपडेट न हो।
Skill का लिंक
https://github.com/TanStack/table/blob/main/packages/alpine-table/skills/table-state/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी Alpine.js टेबल में next पर क्लिक करने के बाद पेज नंबर अपडेट नहीं होता। इसे कैसे ठीक करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह दिखाती है कि getter और callback के साथ नियंत्रित स्थिति कैसे दें, ताकि Alpine नवीनतम मान पढ़े और मान बदलने पर स्क्रीन अपडेट हो।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Load intent load @tanstack/table-core#table-state first for shared ownership, initialization, updater, and reset rules.
Alpine's table proxy makes reads inside x-text, x-for, x-if, bound attributes, x-effect, and Alpine getters reactive. Event handlers read the current value when invoked. A captured value outside a binding does not become a continuing subscription, and there is no table.Subscribe component.
Controlled getter setup
<!-- skill-snippet:check -->import Alpine from 'alpinejs'
import {
createTable,
rowPaginationFeature,
tableFeatures,
type PaginationState,
} from '@tanstack/alpine-table'
const features = tableFeatures({ rowPaginationFeature })
const columns = [{ accessorKey: 'name' }]
const data = [{ name: 'Ada' }]
Alpine.data('pagedTable', () => {
const local = Alpine.reactive<{ pagination: PaginationState }>({
pagination: { pageIndex: 0, pageSize: 10 },
})
const table = createTable({
features,
columns,
data,
state: {
get pagination() {
return local.pagination
},
},
onPaginationChange: (next) => {
local.pagination =
typeof next === 'function' ? next(local.pagination) : next
},
})
return { table }
})
Read table.atoms.pagination.get().pageIndex directly in an Alpine binding.
Reactive boundaries
- A controlled slice needs a getter and callback.
state: { pagination: local.pagination }captures the old object when the owner later replaces it. - Expose changing data through
get data()and keep features, columns, and derived data stable outside reevaluated getters. - The proxy normally reevaluates all Table-reading bindings for every state change. A narrow atom read does not by itself narrow that broad invalidation.
- For shared state, pass a stable external atom through
atoms; omit controlled state and its callback for the same slice.
Read for the task
For advanced reactive boundaries, shared atoms, or detailed subscription examples, read reactivity. For construction or rendering setup, read getting-started.
API discovery
Inspect node_modules/@tanstack/alpine-table/dist/index.d.ts, createTable.d.ts, and reactivity.d.ts. Core feature APIs are in node_modules/@tanstack/table-core/dist/features/.
अक्सर पूछे जाने वाले सवाल
स्थिति बदलने पर मेरी टेबल क्यों ताज़ा नहीं होती?
अक्सर डेटा या स्थिति एक बार कॉपी कर ली गई होती है, getter से नहीं पढ़ी जाती, इसलिए Alpine बाद के बदलाव नहीं देख पाता।
क्या मैं click handler के अंदर कोई मान एक बार पढ़ सकता हूँ?
हाँ। event handlers चलने के समय का मौजूदा मान पढ़ते हैं।
क्या यह मुख्य टेबल गाइड की जगह लेती है?
नहीं। यह मुख्य गाइड के साझा स्वामित्व और रीसेट नियमों के ऊपर Alpine-विशिष्ट नियम जोड़ती है।
जानकारी
लेखक का मूल विवरण
Read and control Table v9 state in alpine. Use for tracked reads, subscriptions, controlled slices, and framework-specific reactive boundaries.
repo: TanStack/table
लोकप्रियता
- GitHub स्टार
- 29k
- रैंकिंग में स्थान
- #9806
- लाइसेंस
- MIT
- अपडेट की गई
- 21/10/2026
कमेंट
- …
इस repository की और skills
getting-started
29kयह आपके एजेंट को Alpine.js में TanStack Table से डेटा टेबल बनाना और दिखाना सिखाती है, जिसमें सेटअप, रिएक्टिव डेटा और पंक्तियाँ दिखाना शामिल है।
devtools
29kयह आपके एजेंट को Angular टेबल को TanStack Devtools पैनल में रजिस्टर करना सिखाती है, ताकि डेवलपर ऐप बनाते समय हर टेबल की जांच कर सकें।
getting-started
29kयह आपके एजेंट को Angular में TanStack टेबल बनाना और दिखाना सिखाती है, जिसमें injectTable सेटअप, टेम्प्लेट रेंडरिंग और पंक्ति डेटा के अपडेट शामिल हैं।
migrate-v8-to-v9
29kयह आपके एजेंट को Angular टेबल को TanStack Table v8 से v9 पर ले जाने में मदद करती है, सेटअप, रेंडरिंग, स्थिति और hooks को माइग्रेशन जांच सूची से मिलाकर।
मिलती-जुलती 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 फॉलो करवाता है।