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 - built on
@tanstack/table-corev9Features, 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.useTableitself is web.


- 1.42–1.45× faster unmount than
@tanstack/react-tablewith 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 →A data grid without the performance tuning chapter.
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.originaland keeping every update immutable; here it is how the adapter works.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. Notable.Subscribewrapper, no selector.Options as a function
useTable(() => ({ data: products(), columns, features }))reads signals inside; changeproductsand the table re-syncs.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
originalfreezes; the adapter re-runs cells on a structure change on purpose.
The memo you no longer write.
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>
)
}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 TanStack Table (React)?
Same core, same column defs, different render loop.
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} />)}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>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 107 | Kitchen | 91 | |
| Cable 117 | Home | 101 | |
| Cable 127 | Kitchen | 111 | |
| Cable 137 | Home | 1 | |
| Cable 147 | Kitchen | 11 | |
| Cable 157 | Home | 21 | |
| Cable 167 | Kitchen | 31 | |
| Cable 177 | Home | 41 | |
| Cable 187 | Kitchen | 51 | |
| Cable 197 | Home | 61 | |
| Cable 207 | Kitchen | 71 | |
| Cable 217 | Home | 81 | |
| Cable 227 | Kitchen | 91 | |
| Cable 237 | Home | 101 | |
| Cable 247 | Kitchen | 111 | |
| Cable 257 | Home | 1 | |
| Cable 267 | Kitchen | 11 | |
| Cable 277 | Home | 21 | |
| Cable 287 | Kitchen | 31 | |
| Cable 297 | Home | 41 | |
| Cable 307 | Kitchen | 51 | |
| Cable 317 | Home | 61 | |
| Cable 327 | Kitchen | 71 | |
| Cable 337 | Home | 81 | |
| Cable 347 | Kitchen | 91 | |
| Cable 357 | Home | 101 | |
| Cable 367 | Kitchen | 111 | |
| Cable 377 | Home | 1 | |
| Cable 387 | Kitchen | 11 | |
| Cable 397 | Home | 21 | |
| Cable 407 | Kitchen | 31 | |
| Cable 417 | Home | 41 | |
| Cable 427 | Kitchen | 51 | |
| Cable 437 | Home | 61 | |
| Cable 447 | Kitchen | 71 | |
| Cable 457 | Home | 81 | |
| Cable 467 | Kitchen | 91 | |
| Cable 477 | Home | 101 | |
| Cable 487 | Kitchen | 111 | |
| Cable 497 | Home | 1 |
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.
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.
- unmount1.21 ms1.75 mswin1.42–1.45×
- replace 1,000 rows22.52 ms24.95 mswin1.11× run 1 · 1.18× run 2
- sort 1,000 rows17.69 ms19.32 mswin1.09–1.10×
- mount25.64 ms25.81 mssplittie in run 1, 1.03× in run 2
- update one cell1.5 ms1.54 mssplittie in run 1, 1.03× in run 2
- happy-dom: single-cell update vs memoized rows, 100 rowswin1.6×
- happy-dom: replace vs memoized rowswin1.4–1.5×
- happy-dom: mount, 100 rowstiecould not distinguish
- happy-dom: mount, 1,000 rowslossreact-table 1.3×
- happy-dom: single-cell update vs memoized rows, 1,000 rowslossreact-table 1.2×
- happy-dom: sort vs memoized rows, 100 rowslossreact-table 1.3×
- happy-dom: sort vs memoized rows, 1,000 rowstiecould not distinguish
Every TanStack feature, plus Pyreon's own pieces.
useTable(() => options)Returns the v9Tabledirectly; its state is signals.flexRenderCell+visibleCellsThe fine-grained pair: a cell subscribes to its own row, a row's cell list to column geometry.flexRenderHeaders and footers from column-def templates: strings, functions or JSX.- Sorting, filtering, pagination
rowSortingFeature,columnFilteringFeature,globalFilteringFeature,rowPaginationFeatureand their row models. - Grouping and aggregation
columnGroupingFeature,rowAggregationFeatureand theaggregationFn_*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_*andaggregationFn_*re-exported fortableFeatures. createTableStateA 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-coretypes re-exported.
Things to build with it.
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 productscreateTableState 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>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.
- useTable
- flexRender
- flexRenderCell
- visibleCells
- pyreonReactivity
- createTableState
- tableFeatures
- stockFeatures
- rowSortingFeature
- columnFilteringFeature
- globalFilteringFeature
- rowPaginationFeature
- rowSelectionFeature
- columnVisibilityFeature
- columnGroupingFeature
- rowExpandingFeature
- columnPinningFeature
- columnSizingFeature
- columnResizingFeature
- columnOrderingFeature
- columnFacetingFeature
- rowPinningFeature
- rowAggregationFeature
- cellSelectionFeature
- cellSpanningFeature
- createSortedRowModel
- createFilteredRowModel
- createPaginatedRowModel
- createGroupedRowModel
- createExpandedRowModel
- createFacetedRowModel
- createColumnHelper
- sortFns
- filterFns
- aggregationFns
- functionalUpdate
- tableOptions
- UseTableOptions
- TableState
- TableStateOptions
- TableColumn
- SortDirection
- ColumnDef
- Table
- Row
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.
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