Skip to main content
This page documents the legacy settings API, which is deprecated. It keeps working for existing apps, but new apps should define settings in src/app/settings/ instead; see Workspace settings. To convert an existing app, use the folder structure migration guide.
The useWorkspaceSettings() hook provides real-time access to your app’s workspace settings. It automatically subscribes to settings updates, so your components will always reflect the current configuration.

Parameters

This hook takes no parameters. The return type is automatically inferred from your workspace settings schema defined in src/app.settings.ts.

Returns

Returns an object containing all workspace settings values as defined in your schema. The returned object is fully typed based on your schema definition.

Example

widget.tsx

Type Safety

The hook’s return type is automatically inferred from your schema:
app.settings.ts