Skip to content

Function: useDashboard() ​

ts
function useDashboard<T>(options): Current<
  | Dashboard<FieldOf<T>>
| null>;

Defined in: packages/svelte/src/runes.svelte.ts:58

Create a dashboard and destroy it when the calling component is destroyed. current is null until the engine has loaded the data, and always during server rendering.

Call it while a component initializes, or inside $effect.root.

Pass a getter to make the options reactive: the dashboard is rebuilt when data or engine changes. Other options are read once per build.

Type Parameters ​

Type Parameter
T extends Row

Parameters ​

ParameterType
optionsMaybeGetter<DashboardOptions<T>>

Returns ​

Current< | Dashboard<FieldOf<T>> | null>

Released under the MIT License.