CodeVetter · Repo Unpack · Extension points
TanStack/table
Customization is explicit and predominantly configured per table. The features object combines runtime modules, row-model factories, function registries, and type-only metadata while retaining their distinct roles. Framework adapters provide a reactivity contract, and React's hook factory binds application components and contexts. Worker processing and devtools expose additional public integration seams.
- tableFeatures is a runtime identity helper with compile-time ValidateFeatureSlots constraints. FeatureSlotPrereqs validates pairings such as resizing/sizing, global/column filtering, and sorting factories/rowSortingFeature.
- Custom modules can declaration-merge Plugins and feature-map interfaces; the worker plugin demonstrates registering both workerRowModelsFeature and its state slice without application-side module declarations.
- Feature hooks separate shared prototype APIs, table APIs, defaults, per-instance initialization, and reset behavior. Runtime construction invokes each feature's table initialization immediately before its API construction in registration order.
- Row-model slots accept factory replacements; core falls back to createCoreRowModel, while optional derived stages fall back to predecessors. createWorkerRowModel occupies those same slots rather than introducing a separate renderer API.
- sortFns, filterFns, and aggregationFns are per-table registries whose keys participate in inference. Sorting also accepts comparator functions directly, resolves auto-selected names, and falls back to basic when a named function is unavailable.
- createColumnHelper supports key/function accessors, display columns, nested groups, and tuple-preserving column arrays. metaHelper supplies phantom tableMeta/columnMeta types, which construction removes from the runtime feature list.
- TableReactivityBindings is the adapter seam for writable/readonly atoms, subscriptions, batching, untracking, scheduling, options stores, and optional commit/unmount operations; React inserts its binding before constructing the core table.
- createTableHook binds table/cell/header component collections and contexts into useAppTable, while devtools registration managers expose update/dispose and key-based leases for integrating additional adapter lifecycles.