Skip to content
@pyreon/table
fundamentals · data grids

Edit one cell. One cell updates. No React.memo.

TanStack Table v9, with the table's state stored in Pyreon signals. Sort, filter, paginate and group with the API you know; change one price and exactly one text node changes, at 100 rows or 1,000, with no memo comparator to keep correct.

bun add @pyreon/table
Documentation
built on
@tanstack/table-core v9Features, row models, sort and filter functions re-exported from one import.
single-cell edit
1 DOM write6 cell re-runs (one row), the same at 100 and 1,000 rows.
vs react-table, Chromium
replace 1.11–1.18× · sort 1.09–1.10×Against memoized rows, two runs. Unmount 1.42–1.45×.
iOS and Android
createTableStateSort, filter, paginate and select lower natively. useTable itself is web.
An orders table built with @pyreon/table in the Pyreon example dashboard: search and status filter, columns for order, customer, category, items, total, status badges and date, a Refund action per row, and pagination showing 1–10 of 240.An orders table built with @pyreon/table in the Pyreon example dashboard: search and status filter, columns for order, customer, category, items, total, status badges and date, a Refund action per row, and pagination showing 1–10 of 240.
  • 1.42–1.45× faster unmount than @tanstack/react-table with memoized rows, 1,000 × 6BENCHMARKS.md §2 table, real Chromium · final pass, two runs
  • 1.11–1.18× faster replacing 1,000 rows; sort 1.09–1.10×BENCHMARKS.md §2 table, real Chromium · two runs
  • 1 DOM write for a single-cell edit, at 100 rows and at 1,000packages/fundamentals/table/bench/table-rerender-bench.ts header (measured counts)

synthetic · author-run · M3 Max · record of 2026-11-05

Every result, including where we lose →
why teams pick it

A data grid without the performance tuning chapter.

  1. Cell-level updates by default

    An in-place edit re-runs only the edited row's cells (six in a six-column table) and writes one DOM node. With React you get that by memoizing rows on row.original and keeping every update immutable; here it is how the adapter works.

  2. The table's state is signals

    v9's reactivity seam is backed by Pyreon signals, so table.getRowModel() read in JSX subscribes like any signal. No table.Subscribe wrapper, no selector.

  3. Options as a function

    useTable(() => ({ data: products(), columns, features })) reads signals inside; change products and the table re-syncs.

  4. Correct before clever

    A cell that reads table state (selection, sort) stays right when that state changes. The same cell inside a row memoized on original freezes; the adapter re-runs cells on a structure change on purpose.

the difference

The memo you no longer write.

React + @tanstack/react-table 9

Per-row updates need a memoized row component, a comparator on row.original, and immutable edits everywhere.

const ProductRow = memo(
  ({ row }: { row: Row<typeof features, Product> }) => (
    <tr>
      {row.getVisibleCells().map((cell) => (
        <td key={cell.id}>
          {flexRender(cell.column.columnDef.cell, cell.getContext())}
        </td>
      ))}
    </tr>
  ),
  (a, b) => a.row.original === b.row.original,
)

function Products() {
  const [data, setData] = useState(initial)
  const table = useTable({ features, data, columns, getRowId: (p) => p.id })
  return (
    <table><tbody>
      {table.getRowModel().rows.map((row) => (
        <ProductRow key={row.id} row={row} />
      ))}
    </tbody></table>
  )
}
with @pyreon/table

Keyed rows, reactive cells. Editing one price touches one text node.

import { For } from '@pyreon/core'
import { signal } from '@pyreon/reactivity'
import { flexRenderCell, useTable, visibleCells } from '@pyreon/table'

const products = signal(initial)
const table = useTable(() => ({
  features, data: products(), columns, getRowId: (p) => p.id,
}))

const Products = () => (
  <table><tbody>
    <For each={() => table.getRowModel().rows} by={(r) => r.id}>
      {(row) => (
        <tr>
          <For each={() => visibleCells(table, row.id)} by={(c) => c.id}>
            {(cell) => <td>{() => flexRenderCell(table, row.id, cell.column.id)}</td>}
          </For>
        </tr>
      )}
    </For>
  </tbody></table>
)
coming from

Coming from TanStack Table (React)?

Same core, same column defs, different render loop.

TanStack Table (React)
import {
  useTable, tableFeatures, rowSortingFeature,
  createSortedRowModel, sortFns,
} from '@tanstack/react-table'

const features = tableFeatures({
  rowSortingFeature,
  sortedRowModel: createSortedRowModel(),
  sortFns,
})

const [data] = useState(initial)
const table = useTable({ features, data, columns })

{table.getRowModel().rows.map((row) => <ProductRow key={row.id} row={row} />)}
Pyreon

tableFeatures, column defs, row models and sortFn_* / filterFn_* move over unchanged; they come from the same @tanstack/table-core v9. The two changes: options become a function, and rows render through keyed <For> with visibleCells and flexRenderCell instead of .map().

import {
  useTable, tableFeatures, rowSortingFeature,
  createSortedRowModel, sortFns,
} from '@pyreon/table'

const features = tableFeatures({
  rowSortingFeature,
  sortedRowModel: createSortedRowModel(),
  sortFns,
})

const data = signal(initial)
const table = useTable(() => ({ features, data: data(), columns }))

<For each={() => table.getRowModel().rows} by={(r) => r.id}>…</For>
try it

Sort, filter, edit.

1,000 products. Click a header to sort, type to filter, and double-click a price to edit it. Two counters show what your last edit cost: the cells that re-ran (one row's worth) and the DOM nodes written (one).

Cable 107Kitchen91
Cable 117Home101
Cable 127Kitchen111
Cable 137Home1
Cable 147Kitchen11
Cable 157Home21
Cable 167Kitchen31
Cable 177Home41
Cable 187Kitchen51
Cable 197Home61
Cable 207Kitchen71
Cable 217Home81
Cable 227Kitchen91
Cable 237Home101
Cable 247Kitchen111
Cable 257Home1
Cable 267Kitchen11
Cable 277Home21
Cable 287Kitchen31
Cable 297Home41
Cable 307Kitchen51
Cable 317Home61
Cable 327Kitchen71
Cable 337Home81
Cable 347Kitchen91
Cable 357Home101
Cable 367Kitchen111
Cable 377Home1
Cable 387Kitchen11
Cable 397Home21
Cable 407Kitchen31
Cable 417Home41
Cable 427Kitchen51
Cable 437Home61
Cable 447Kitchen71
Cable 457Home81
Cable 467Kitchen91
Cable 477Home101
Cable 487Kitchen111
Cable 497Home1

Double-click a price, or focus it and press Enter, to edit. Enter saves, Escape cancels.

  • rows shown1000
  • cells re-run by the last edit–
  • DOM writes by the last edit–

The two edit counters move on edits only. Sorting and filtering are table state: rows move and are re-read, which is a different cost.

benchmarks

Unmount 1.4× faster than memoized react-table.

Same table-core on both sides; React rows are memoized on row.original, the fair comparison. In the browser Pyreon wins replace, sort and unmount in both runs; mount and single-cell update are a tie in one run and 1.03× ahead in the other. The happy-dom rows at the bottom (one run) time a JavaScript DOM, not a browser; they include three losses, kept here so you can see them.

vs @tanstack/react-table 9.3.1 with memoized rows · 1,000 rows × 6 columns, real ChromiumPyreonrival · lower is better
  • unmount
    1.21 ms
    1.75 ms
    win1.42–1.45×
  • replace 1,000 rows
    22.52 ms
    24.95 ms
    win1.11× run 1 · 1.18× run 2
  • sort 1,000 rows
    17.69 ms
    19.32 ms
    win1.09–1.10×
  • mount
    25.64 ms
    25.81 ms
    splittie in run 1, 1.03× in run 2
  • update one cell
    1.5 ms
    1.54 ms
    splittie in run 1, 1.03× in run 2
  • happy-dom: single-cell update vs memoized rows, 100 rows
    win1.6×
  • happy-dom: replace vs memoized rows
    win1.4–1.5×
  • happy-dom: mount, 100 rows
    tiecould not distinguish
  • happy-dom: mount, 1,000 rows
    lossreact-table 1.3×
  • happy-dom: single-cell update vs memoized rows, 1,000 rows
    lossreact-table 1.2×
  • happy-dom: sort vs memoized rows, 100 rows
    lossreact-table 1.3×
  • happy-dom: sort vs memoized rows, 1,000 rows
    tiecould not distinguish
Apple M3 Max · record of 2026-11-05 · final pass · Chromium rows two runs, happy-dom rows one run · author-run, syntheticFull method, every loss →
what's included

Every TanStack feature, plus Pyreon's own pieces.

  • useTable(() => options) Returns the v9 Table directly; its state is signals.
  • flexRenderCell + visibleCells The fine-grained pair: a cell subscribes to its own row, a row's cell list to column geometry.
  • flexRender Headers and footers from column-def templates: strings, functions or JSX.
  • Sorting, filtering, pagination rowSortingFeature, columnFilteringFeature, globalFilteringFeature, rowPaginationFeature and their row models.
  • Grouping and aggregation columnGroupingFeature, rowAggregationFeature and the aggregationFn_* set.
  • Selection, expanding, pinning Row selection, row expanding, row and column pinning.
  • Column sizing, resizing, ordering Plus visibility and faceting.
  • Built-in functions sortFn_*, filterFn_* and aggregationFn_* re-exported for tableFeatures.
  • createTableState A dependency-free sort, filter, paginate and select engine for simple tables, and the one that runs natively.
  • One import source Everything above from @pyreon/table; @tanstack/table-core types re-exported.
recipes

Things to build with it.

Sort, search and page a product list

Register only what the table uses. Changing the data signal re-syncs; sorting and filtering are the TanStack calls you know.

const features = tableFeatures({
  rowSortingFeature,
  sortedRowModel: createSortedRowModel(),
  sortFns: { alphanumeric: sortFn_alphanumeric, basic: sortFn_basic },
  columnFilteringFeature,
  globalFilteringFeature,
  filteredRowModel: createFilteredRowModel(),
  filterFns: { includesString: filterFn_includesString },
  rowPaginationFeature,
  paginatedRowModel: createPaginatedRowModel(),
})

const table = useTable(() => ({
  features, data: products(), columns, globalFilterFn: 'includesString',
}))

table.getColumn('price')!.toggleSorting(true) // most expensive first
table.setGlobalFilter('desk')  // ['Standing desk', 'Desk lamp']
table.setGlobalFilter('')
table.setPageSize(2)           // 3 pages of 5 products
A table that also runs on iOS and Android

createTableState has no dependencies: sort, filter, paginate and select over your data, rendered with <For>.

import { createTableState } from '@pyreon/table'

const t = createTableState({
  data: products,
  columns: [{ id: 'name' }, { id: 'price' }],
  pageSize: 2,
  rowId: (p) => p.name,
})

t.toggleSort('price')   // asc: Plant pot, Desk lamp
t.toggleSort('price')   // desc: Standing desk, USB-C dock
t.setFilter('desk')     // Standing desk, Desk lamp
t.toggleSelected('Desk lamp')
t.selectedIds()         // ['Desk lamp']

<For each={t.rows()} by={(p) => p.name}>{(p) => <Text>{p.name}</Text>}</For>
api

A thin adapter and the whole core.

Every export has a reference page with its signature, an example and the mistakes people make with it.

pyreon · 6
  • useTable
  • flexRender
  • flexRenderCell
  • visibleCells
  • pyreonReactivity
  • createTableState
features · 19
  • tableFeatures
  • stockFeatures
  • rowSortingFeature
  • columnFilteringFeature
  • globalFilteringFeature
  • rowPaginationFeature
  • rowSelectionFeature
  • columnVisibilityFeature
  • columnGroupingFeature
  • rowExpandingFeature
  • columnPinningFeature
  • columnSizingFeature
  • columnResizingFeature
  • columnOrderingFeature
  • columnFacetingFeature
  • rowPinningFeature
  • rowAggregationFeature
  • cellSelectionFeature
  • cellSpanningFeature
row models · 6
  • createSortedRowModel
  • createFilteredRowModel
  • createPaginatedRowModel
  • createGroupedRowModel
  • createExpandedRowModel
  • createFacetedRowModel
helpers · 6
  • createColumnHelper
  • sortFns
  • filterFns
  • aggregationFns
  • functionalUpdate
  • tableOptions
types · 8
  • UseTableOptions
  • TableState
  • TableStateOptions
  • TableColumn
  • SortDirection
  • ColumnDef
  • Table
  • Row
good to know

Good to know before you start.

Render rows with <For>, not .map()

A .map() over rows rebuilds the whole <tbody> on every change. Keyed <For> with visibleCells and flexRenderCell is what makes edits cell-sized.

Sorting re-runs every cell

A sort or any structure change re-runs all cells (memoized React rows re-run none); DOM writes are the same keyed moves on both sides. That is the price of cells that read table state staying correct.

An edit that changes sort order waits

Editing a value updates the cell at once, but rows re-position on the next structure or state change. toggleSorting and setSorting reorder normally.

Register features explicitly

v9 includes only what you list in tableFeatures, which keeps bundles small; build the object once at module scope. row.getVisibleCells() needs columnVisibilityFeature; without it, visibleCells falls back to every cell of the row.

questions

What people ask first.

Is it faster than react-table?

In real Chromium, against react-table with memoized rows at 1,000 × 6, two runs: replace 1.11–1.18×, sort 1.09–1.10×, unmount 1.42–1.45× faster; mount and single-cell update tie in one run and are 1.03× ahead in the other, so we do not count them as wins. Under happy-dom (one run) the record shows losses at mount (1,000 rows), single-cell update (1,000) and sort (100); happy-dom is a JavaScript DOM, which is why the headline uses the browser.

Do I have to learn a new table API?

No. Features, column defs, row models and every table method are TanStack Table v9. Two things change: options become a function, and rows render through keyed <For>.

How big a table can it handle?

It renders every row you give it. For thousands of rows, page them, or render the visible window with @pyreon/virtual.

Does it run on native?

useTable stays web. createTableState covers the common table (one sort column, a text filter, pages, selection), is plain signals, and lowers to iOS and Android. Native targets are experimental.

The fastest cell is the one that did not re-render.

bun add @pyreon/table
Read the table guide