getting-started
यह क्या करती है
यह स्किल दिखाती है कि TanStack Table से Lit web component के अंदर टेबल कैसे बनाएँ। यह उन डेवलपरों के लिए है जो Lit से दोबारा इस्तेमाल होने वाले components बनाते हैं।
कब इस्तेमाल करें
- ✓जब आप ऐसा Lit web component बना रहे हों जो आइटम की सूची टेबल में दिखाए।
- ✓जब component का डेटा बदलने पर टेबल फिर से रेंडर होनी चाहिए।
- ✓जब आपका Lit ऐप एक ही टेबल सेटअप कई जगह दोहराता हो और आप उसका दोबारा इस्तेमाल होने वाला रूप चाहते हों।
Skill का लिंक
https://github.com/TanStack/table/blob/main/packages/lit-table/skills/getting-started/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं एक Lit web component बना रहा हूँ जो लोगों की सूची टेबल में दिखाता है। इसे कैसे सेट करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह समझाती है कि टेबल controller component से कैसे जुड़ता है, रेंडरिंग के दौरान टेबल कैसे बनाता है, और FlexRender सहायक से हेडर व पंक्तियाँ कैसे दिखाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Load intent load @tanstack/table-core#core first for the headless model, stable inputs, and column inference.
Setup
import { LitElement, html } from 'lit'
import { customElement, state } from 'lit/decorators.js'
import { repeat } from 'lit/directives/repeat.js'
import {
FlexRender,
TableController,
createColumnHelper,
tableFeatures,
} from '@tanstack/lit-table'
type Person = { id: string; name: string }
const features = tableFeatures({})
const columnHelper = createColumnHelper<typeof features, Person>()
const columns = columnHelper.columns([
columnHelper.accessor('name', { header: 'Name' }),
])
@customElement('people-table')
export class PeopleTable extends LitElement {
@state() private people: Array<Person> = [{ id: '1', name: 'Ada' }]
private tableController = new TableController<typeof features, Person>(this)
protected render() {
const table = this.tableController.table({
features,
columns,
data: this.people,
getRowId: (row) => row.id,
})
return html`<table>
<thead>
${repeat(
table.getHeaderGroups(),
(group) => group.id,
(group) =>
html`<tr>
${repeat(
group.headers,
(header) => header.id,
(header) =>
html`<th>
${header.isPlaceholder ? null : FlexRender({ header })}
</th>`,
)}
</tr>`,
)}
</thead>
<tbody>
${repeat(
table.getRowModel().rows,
(row) => row.id,
(row) =>
html`<tr>
${repeat(
row.getAllCells(),
(cell) => cell.id,
(cell) => html`<td>${FlexRender({ cell })}</td>`,
)}
</tr>`,
)}
</tbody>
</table>`
}
}
Construction and rendering
Keep one TableController as a host field. V9 takes only the host in its constructor; pass current options to controller.table(...) during every render. Recreating the controller repeats lifecycle and subscription work.
Keep features, columns, and data stable across host updates. Use FlexRender({ cell }), FlexRender({ header }), or FlexRender({ footer }) in Lit templates. The application owns semantic markup, accessibility, widths, and sticky positioning.
The controller selects all registered state by default. Narrow selected state only when host update cost requires it; use table-state for selectors and template subscriptions.
Read for the task
- When adding or configuring optional features, load
intent load @tanstack/table-core#table-featuresand read only references for the requested behavior. - For state ownership or reactive reads, read table-state.
- When tables share features, defaults, or reusable UI, read create-table-hook.
- When virtualizing rows or columns, read with-tanstack-virtual.
- When upgrading v8 code, read migrate-v8-to-v9.
API discovery
Inspect node_modules/@tanstack/lit-table/dist/index.d.ts, then TableController.d.ts, flexRender.d.ts, or the relevant exported declaration. Core feature APIs are in node_modules/@tanstack/table-core/dist/features/.
अक्सर पूछे जाने वाले सवाल
टेबल controller क्या करता है?
यह component के लिए टेबल बनाता है, और जब टेबल की स्थिति बदलती है तो component से अपडेट मांगता है।
क्या मुझे Lit टेम्प्लेट कैसे काम करते हैं यह जानना होगा?
बुनियादी Lit ज्ञान मददगार है, क्योंकि उदाहरण Lit के html टेम्प्लेट और repeat directive इस्तेमाल करते हैं।
क्या यह सिर्फ़ Lit के लिए है?
हाँ। यह TanStack Table v9 के Lit संस्करण को कवर करती है।
जानकारी
लेखक का मूल विवरण
Create and render Table v9 with the lit adapter. Route reusable createTableHook components, Virtual integration, and framework setup; use table-state for reactive ownership.
repo: TanStack/table
लोकप्रियता
- GitHub स्टार
- 29k
- रैंकिंग में स्थान
- #9813
- लाइसेंस
- 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 फॉलो करवाता है।