Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

TanStack · Type Alias

Table

Table<TFeatures, TData> is the TanStack Table instance type. It combines core table behavior with the APIs contributed by the enabled features.

How it works

Table<TFeatures, TData> combines core table behavior with the types supplied by enabled features. A table instance is produced by the framework adapter and exposes operations such as retrieving the row model; the generic parameters describe the feature set and row-data shape.

Syntax

type Table<TFeatures, TData> = Table_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, Table_FeatureMap<TFeatures, TData>>;

Parameters

NameTypeDescription
TFeaturesTableFeaturesThe enabled table-feature set used to derive feature-specific table members.
TDataRowDataThe shape of data stored in each table row.

Returns

A table instance type containing core functionality plus members derived from enabled features.

Key points

  • Table is an intersection type whose first component is the core table type.
  • Its second component extracts feature-specific members from the table feature map.
  • The alias models the complete table object, not only its core behavior.
  • Feature availability is tied to features enabled through the table configuration.

Common mistakes

  • The type reflects enabled features, so feature-specific members depend on the selected feature set rather than being universally available.

Example: Create and inspect a table

import { createColumnHelper, getCoreRowModel, useReactTable } from '@tanstack/react-table'

type Person = { name: string; age: number }
const data: Person[] = [{ name: 'Ada', age: 36 }]
const columnHelper = createColumnHelper<Person>()
const columns = [columnHelper.accessor('name', { header: 'Name' })]

const table = useReactTable({
  data,
  columns,
  getCoreRowModel: getCoreRowModel(),
})

const allRows = table.getRowModel().rows

Creates a table instance and reads its current row model.

When to use it

Strongly typed table references

Typing a table instance in adapter or reusable component code.

Table-instance operations

Accessing core operations and feature APIs from a created table.

Row-data type propagation

Propagating row-data types into table-related APIs.

Interview questions

QWhat does the Table type alias combine?

Table<TFeatures, TData> is an intersection of Table_Core<TFeatures, TData> and ExtractFeatureMapTypes<TFeatures, Table_FeatureMap<TFeatures, TData>>. This gives the instance its core API plus the type contributions from enabled features.

Follow-up: Why use feature extraction? It lets the table type expose only the feature-related members associated with the generic feature set.

QWhat are the generic parameters for?

TFeatures describes the table's feature configuration, while TData describes the row-data type. Both are carried through the core and feature-derived portions of the alias.

Follow-up: How would a row-specific API become type-safe? Bind TData to the row interface used by the table's data and column definitions.

QWhat does a Table value represent?

The documentation describes Table as the table object containing core functionality and enabled features. In application code, an adapter-created table instance is the value consumed to access table operations such as its row model.

Follow-up: What should be checked when a feature method is missing? Verify that the feature is enabled and included in the table's generic feature set.

  • Table_Core
  • Table_FeatureMap
  • TableFeatures
  • RowData
  • useReactTable
  • getCoreRowModel

Source: Table | TanStack Table Docs. Checked 2026-10-16.