Saltar al contenido
Skillpedia
Sitios e interfaces (frontend)29 mil · #9817

getting-started

Qué hace

Esta habilidad muestra cómo construir una tabla de datos en una app de Octane con TanStack Table. Es para desarrolladores que usan Octane y su sintaxis de plantillas TSRX.

Cuándo usarla

  • ✓Cuando estás construyendo una página de Octane que muestra una lista de registros en una tabla.
  • ✓Cuando necesitas que la tabla muestre encabezados y celdas mediante su ayudante de renderizado.
  • ✓Cuando quieres definir las columnas de la tabla con un ayudante de columnas en un archivo TSRX.

Link de la skill

https://github.com/TanStack/table/blob/main/packages/octane-table/skills/getting-started/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/TanStack/table/blob/main/packages/octane-table/skills/getting-started/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Estoy construyendo una página de Octane que muestra una lista de productos en una tabla. ¿Cómo lo configuro?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Da un componente de ejemplo con columnas y datos, y luego recorre los encabezados, las filas y las celdas en el marcado para mostrarlos en la página.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Load intent load @tanstack/table-core#core first for the headless model, stable inputs, and column inference.

Setup

import { createRoot, useState } from 'octane'
import {
  createColumnHelper,
  tableFeatures,
  useTable,
} from '@tanstack/octane-table'

type Person = { name: string }
const features = tableFeatures({})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])

function PeopleTable() @{
  const [data] = useState<Person[]>([{ name: 'Ada' }])
  const table = useTable({ features, columns, data })

  <table>
    <thead>
      @for (const group of table.getHeaderGroups(); key group.id) {
        <tr>
          @for (const header of group.headers; key header.id) {
            <th><table.FlexRender header={header} /></th>
          }
        </tr>
      }
    </thead>
    <tbody>
      @for (const row of table.getRowModel().rows; key row.id) {
        <tr>
          @for (const cell of row.getAllCells(); key cell.id) {
            <td><table.FlexRender cell={cell} /></td>
          }
        </tr>
      }
    </tbody>
  </table>
}

const rootElement = document.getElementById('root')
if (!rootElement) throw new Error('Root element not found')
createRoot(rootElement).render(PeopleTable)

Construction and rendering

This adapter distributes authored TypeScript and TSRX. Configure the consumer with octane() in vite.config.ts and the TSRX JSX import source octane. Author component bodies with @{ ... } and keyed @for loops for rows, headers, and cells.

Import from @tanstack/octane-table. Render table.FlexRender as a component so it gets its own Octane scope. It preserves numbers including 0, render descriptors, and component functions.

Keep features and column definitions at module scope. For inputs that depend on component state, use useMemo; pass the current stable data array to useTable. Convert non-renderable values with String(value) when displaying them as text.

Read for the task

  • When adding or configuring optional features, load intent load @tanstack/table-core#table-features and 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.

API discovery

Inspect node_modules/@tanstack/octane-table/src/index.d.ts, the matching *.tsrx.d.ts sidecar, and src/types.ts. This package publishes authored source; core APIs are in installed @tanstack/table-core/dist/.

Preguntas frecuentes

¿Qué es TSRX?

Los ejemplos están escritos en TSRX, la sintaxis de componentes que usa este adaptador, así que se ven distintos al JSX común.

¿De dónde saca la tabla sus datos?

El ejemplo guarda los datos en el estado de Octane con useState y se los pasa a la tabla.

¿Reemplaza a la guía principal de tablas?

No. Supone que ya leíste primero la guía principal sobre el modelo de tabla headless.

Detalles

Descripción original del autor

Create and render Table v9 with the octane adapter. Route reusable createTableHook components, and framework setup; use table-state for reactive ownership.

repo: TanStack/table

Popularidad

Estrellas en GitHub
29 mil
Posición en el ranking
#9817
Licencia
MIT
Actualizada
21/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas