Pular para o conteúdo
Skillpedia
Sites e telas (frontend)29 mil · #9817

getting-started

O que ela faz

Esta habilidade mostra como construir uma tabela de dados em um aplicativo Octane com o TanStack Table. Serve para desenvolvedores que usam o Octane e a sintaxe de template TSRX.

Quando usar

  • ✓Quando você está criando uma página Octane que exibe uma lista de registros em uma tabela.
  • ✓Quando você precisa que a tabela mostre cabeçalhos e células pelo seu auxiliar de renderização.
  • ✓Quando você quer definir as colunas da tabela com um auxiliar de colunas em um arquivo TSRX.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/TanStack/table/blob/main/packages/octane-table/skills/getting-started/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Estou criando uma página Octane que mostra uma lista de produtos em uma tabela. Como configuro isso?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

Ela oferece um componente de exemplo com colunas e dados, depois percorre os cabeçalhos, as linhas e as células na marcação para exibi-los na página.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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/.

Perguntas frequentes

O que é TSRX?

Os exemplos são escritos em TSRX, a sintaxe de componente que este adaptador usa, então eles são diferentes de JSX comum.

De onde a tabela obtém os dados?

O exemplo guarda os dados no estado do Octane com useState e os passa para a tabela.

Isto substitui o guia principal da tabela?

Não. Ele supõe que você já leu antes o guia principal sobre o modelo de tabela sem aparência.

Detalhes

Descrição original do 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

Popularidade

Estrelas no GitHub
29 mil
Posição no ranking
#9817
Licença
MIT
Atualizada em
21/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas