Frontend & UISûr100100/100
Create Table Hook (TanStack) — Vue Table
Create a reusable Vue useAppTable/createAppColumnHelper with shared features/defaults, reactive per-table options, optional component registries, dynamic App wrappers, typed context hooks, and explicit types that break circular inference.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs create-table-hook__tanstack-table__packages-vue-table-skills-af5aeca0bc1dTanStack
TanStack/table
Contenu à copier
---
name: create-table-hook
description: >
Create a reusable Vue useAppTable/createAppColumnHelper with shared features/defaults, reactive per-table options, optional component registries, dynamic App wrappers, typed context hooks, and explicit types that break circular inference.
metadata:
origin: TanStack
type: framework
library: '@tanstack/vue-table'
framework: vue
library_version: '9.2.4'
requires:
- '@tanstack/table-core#core'
- getting-started
- table-state
sources:
- 'TanStack/table:docs/framework/vue/guide/composable-tables.md'
- 'TanStack/table:examples/vue/composable-tables'
- 'TanStack/table:packages/vue-table/src/createTableHook.ts'
---
This skill builds on `@tanstack/table-core#core`, `getting-started`, and `table-state`. Use it for recurring app conventions; use `useTable` for a one-off.
## Setup
```ts
import {
createTableHook,
rowSortingFeature,
tableFeatures,
} from '@tanstack/vue-table'
import type { RowData, VueTable } from '@tanstack/vue-table'
const features = tableFeatures({ rowSortingFeature })
const hook = createTableHook({ features })
export const useAppTable = hook.useAppTable
export const createAppColumnHelper = hook.createAppColumnHelper
export const useTableContext: <TData extends RowData = RowData>() => VueTable<
typeof features,
TData
> = hook.useTableContext
```
The explicit exported context-hook types are important when registered components import the hook module that also imports those components.
## Core Patterns
### Keep per-table values reactive
```ts
const helper = createAppColumnHelper<Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])
const table = useAppTable({ columns, data })
```
Pass refs/computed options through unchanged.
### Wrap registered component context
Render through `table.AppTable`, `table.AppCell`, or `table.AppHeader`; inside registered components call the corresponding typed context hook instead of prop drilling.
## Common Mistakes
### HIGH Creating circular inferred exports
Wrong:
```ts
export const { useAppTable, useTableContext } = createTableHook({
tableComponents: { Pager },
})
```
Correct:
```ts
const hook = createTableHook({ tableComponents: { Pager } })
export const useTableContext: <TData extends RowData = RowData>() => VueTable<
typeof features,
TData
> = hook.useTableContext
```
When `Pager` imports `useTableContext`, inferred destructured exports can form a circular inference/import chain.
Source: `docs/framework/vue/guide/composable-tables.md`
### HIGH Flattening reactive table options
Wrong:
```ts
useAppTable({ columns, data: data.value })
```
Correct:
```ts
useAppTable({ columns, data })
```
The app hook preserves the adapter’s `MaybeRef` option contract.
Source: `packages/vue-table/src/createTableHook.ts`
### HIGH Using context without App wrappers
Wrong:
```ts
const table = useTableContext()
```
Correct:
```vue
<component :is="table.AppTable"><Pager /></component>
```
The typed context exists only below the corresponding dynamic wrapper.
Source: `packages/vue-table/src/createTableHook.ts`
### MEDIUM Treating Subscribe children as slots
Wrong:
```tsx
<table.Subscribe>
{(atoms) => <Pager page={atoms.pagination.get()} />}
</table.Subscribe>
```
Correct:
```tsx
<table.Subscribe
children={(atoms) => <Pager page={atoms.pagination.get()} />}
/>
```
Vue’s adapter expects an explicit `children` prop in JSX.
Source: `packages/vue-table/src/useTable.ts`
## API Discovery
Inspect `node_modules/@tanstack/vue-table/dist/createTableHook.d.ts` for the returned helpers, wrapper props, registry types, and context contracts.Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait Create Table Hook (TanStack) — Vue Table
Applique les pratiques du skill create-table-hook__tanstack-table__packages-vue-table-skills-af5aeca0bc1d.
Comment utiliser Create Table Hook (TanStack) — Vue Table
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour Create Table Hook (TanStack) — Vue Table
Dis simplement à ton agent quelque chose comme :
Applique le skill create-table-hook__tanstack-table__packages-vue-table-skills-af5aeca0bc1d à cette tâche
Utilise create-table-hook__tanstack-table__packages-vue-table-skills-af5aeca0bc1d pour améliorer cette implémentation
Passe en revue ce sujet avec create-table-hook__tanstack-table__packages-vue-table-skills-af5aeca0bc1d
Skills liés à Create Table Hook (TanStack) — Vue Table
accessibility
Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels, accessibility traits and hints, focus management, contrast, target size, and screen-reader support. Use when building or auditing UI for accessibility compliance, keyboard navigation, or screen-reader support.Accessibility Pass (Microsoft)
Use this skill whenever the user asks to check, review, or fix the accessibility of a PowerPoint deck, Word document, HTML page, or Markdown file, and before handing over any deck or document this agent just generated, so it does not ship with missing alt text, untitled slides, or unreadable colour contrast.Add Connector (Microsoft)
Use when adding a Power Platform connector to an Expo/React Native Power Apps mobile app and no dedicated mobile connector skill exists.