Skip to content
Skillpedia
Websites & UI (frontend)29k · #9817

getting-started

What it does

This skill shows how to build a data table in an Octane app with TanStack Table. It is for developers using Octane and its TSRX template syntax.

When to use it

  • ✓When you are building an Octane page that displays a list of records in a table.
  • ✓When you need the table to show headers and cells through its render helper.
  • ✓When you want to define the table's columns with a column helper in a TSRX file.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/TanStack/table/blob/main/packages/octane-table/skills/getting-started/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“I am building an Octane page that shows a list of products in a table. How do I set that up?”

5 new skills a week. 1 minute to read.

How it works

It gives a sample component with columns and data, then loops over the headers, rows and cells in the markup to show them on the page.

Technical content (original SKILL.md)

Original text by the author, straight from 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/.

FAQ

What is TSRX?

The examples are written in TSRX, the component syntax this adapter uses, so they look different from plain JSX.

Where does the table get its data?

The example keeps the data in Octane state with useState and passes it to the table.

Does this replace the core table guide?

No. It assumes you have read the core guide for the headless table model first.

Details

Original description by the author

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

Popularity

GitHub stars
29k
Ranking position
#9817
License
MIT
Updated
10/21/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills