Hooks
Choose the matching React hook to read an SDK provider context or load a plugin-enhanced dashboard.
React hooks for the SDK context providers: backend, workspace, organization, and theme. Each reads from the matching *Provider higher in the component tree, so you don’t pass these values down through props.
useBackend, useWorkspace, and useTheme take an optional value that overrides the context. Their strict variants, useBackendStrict and useWorkspaceStrict, throw when neither the argument nor the provider supplies a value. To load and render a dashboard with its plugins, use useDashboardLoader.
useBackend
Retrieve the analytical backend from BackendProvider context, with an optional prop override or strict variant.
useWorkspace
Read the workspace identifier from WorkspaceProvider context, with an optional override and a strict variant that throws when unset.
useOrganization
Read the organization identifier supplied to OrganizationProvider, returning the id string or undefined if unset.
useTheme
Read the current theme from ThemeProvider context, with companion hooks for loading state and dark-mode detection.
useDashboardLoader
Load, bootstrap, and tear down a plugin-enhanced dashboard from React, returning status, result, and error state.