Headless engine Headless engine
Headless engine
@pretable/core is the framework-agnostic state + row-model engine beneath <Pretable>. Bring your own rendering.
@pretable/core is the engine that sits beneath <Pretable>. It owns filtering, sorting, selection, focus, column layout, and data transactions, and exposes them as a useSyncExternalStore-ready store: subscribe for change notifications, getSnapshot for the current state. It is framework-agnostic — no React peer dependency, no DOM, no styling.
When to reach for it
Use @pretable/core directly when you're building something the React surface can't express:
- A custom or non-table layout (cards, a board, a tree) driven by grid state.
- A renderer that isn't React.
- Grid logic embedded inside your own component system.
If you just want a table in a React app, use <Pretable> or <PretableSurface> — they wire the engine to a virtualized renderer for you.
Install
npm i @pretable/coreNext
First headless grid
createGrid + useSyncExternalStore, rendering your own table from the
engine's snapshot.