# Data flow — TanStack/table

> Canonical page: https://codevetter.com/unpack/table/data-flow

# Data flow — TanStack/table

Scanned commit 23f21c194e6eba2e7f0321e817104d6e118d6141 (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Applications supply row data, column definitions, feature configuration, and optional external state owners. Construction turns configuration into effective state atoms and feature APIs; row-model reads then derive renderer-facing rows. Updates pass through owner-specific callbacks rather than a durable storage layer in the inspected core. Additional boundaries include worker message transfer, example query caches, and example-owned browser persistence.
- createCoreRowModel memoizes on options.data identity. accessRows assigns IDs through getRowId, constructs rows, populates flatRows and rowsById, and recursively reads children through the optional getSubRows callback. — [packages/table-core/src/core/row-models/createCoreRowModel.ts#L24-L36](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/core/row-models/createCoreRowModel.ts#L24-L36) [packages/table-core/src/core/row-models/createCoreRowModel.ts#L41-L83](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/core/row-models/createCoreRowModel.ts#L41-L83)
- constructTable removes metadata slots, row-model factories, and function registries from actual feature modules, combines remaining modules with coreFeatures, and invokes their defaults and initialization hooks. — [packages/table-core/src/core/table/constructTable.ts#L39-L82](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/core/table/constructTable.ts#L39-L82) [packages/table-core/src/core/table/constructTable.ts#L196-L223](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/core/table/constructTable.ts#L196-L223)
- Effective state reads prefer options.atoms[key], then an own property in options.state, then baseAtoms[key]. Explicitly undefined controlled slices fall back to initialState, and table.store aggregates effective slice values. — [packages/table-core/src/core/table/constructTable.ts#L143-L194](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/core/table/constructTable.ts#L143-L194)
- table_setSorting calls setStateSlice, which resolves onSortingChange and evaluates its equality guard inside the owner's updater. The default makeStateUpdater writes to an external atom when supplied, otherwise to the internal base atom. — [packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L43-L48](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L43-L48) [packages/table-core/src/utils.ts#L97-L114](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/utils.ts#L97-L114) [packages/table-core/src/utils.ts#L223-L247](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/utils.ts#L223-L247)
- React stages current options during render without synchronizing external state, selects a shallow-compared root snapshot, then marks that render committed and publishes its captured controlled state in an isomorphic layout effect. — [packages/react-table/src/useTable.ts#L189-L215](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/react-table/src/useTable.ts#L189-L215) [packages/table-core/src/core/table/coreTablesFeature.utils.ts#L73-L87](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L73-L87)
- Worker synchronization sends changed data separately from requested stages and state. The shadow table batches received state into base atoms, computes requested models, serializes payloads with transferables, and returns requestId/dataVersion for acceptance checks. — [packages/table-core/src/worker/createTableWorker.ts#L193-L207](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/worker/createTableWorker.ts#L193-L207) [packages/table-core/src/worker/createTableWorker.ts#L321-L365](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/worker/createTableWorker.ts#L321-L365) [packages/table-core/src/worker/initTableWorker.ts#L119-L164](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/worker/initTableWorker.ts#L119-L164) [packages/table-core/src/worker/createTableWorker.ts#L216-L245](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/packages/table-core/src/worker/createTableWorker.ts#L216-L245)
- The Query example places pagination, sorting, and globalFilter in its query key, calls local fetchData, and passes returned rows/rowCount into a manually processed table. fetchData waits 500 ms, filters/sorts generated data, and slices the requested page. — [examples/react/with-tanstack-query/src/main.tsx#L127-L171](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/examples/react/with-tanstack-query/src/main.tsx#L127-L171) [examples/react/with-tanstack-query/src/fetchData.ts#L82-L109](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/examples/react/with-tanstack-query/src/fetchData.ts#L82-L109) [examples/react/with-tanstack-query/src/fetchData.ts#L112-L123](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/examples/react/with-tanstack-query/src/fetchData.ts#L112-L123)
- The shadcn-base example owns theme persistence: ThemeProvider reads vite-ui-theme from localStorage, validates light/dark/system, writes selections back, and applies the effective theme as a document-root class. — [examples/react/kitchen-sink-shadcn-base/src/components/theme-provider.tsx#L23-L60](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/examples/react/kitchen-sink-shadcn-base/src/components/theme-provider.tsx#L23-L60) [examples/react/kitchen-sink-shadcn-base/src/main.tsx#L246-L252](https://github.com/TanStack/table/blob/23f21c194e6eba2e7f0321e817104d6e118d6141/examples/react/kitchen-sink-shadcn-base/src/main.tsx#L246-L252)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
