Table state includes data and UI configuration.
State structure:
{
data: [...], // Raw data
columns: [
{ id: 'name', header: 'Name', sortable: true },
{ id: 'email', header: 'Email', filterable: true }
],
sorting: { column: 'name', direction: 'asc' },
filters: { status: 'active' },
pagination: { page: 0, pageSize: 25 },
selection: new Set(['row1', 'row3'])
}
Derived data: Compute filtered, sorted, paginated rows from raw data. Don't store derived state.