appearanceSubstore
Manages lazy-fetched appearance configuration resources. Each key in the registry maps to a distinct appearance config (e.g., "frontend") fetched from the API on first access and cached for subsequent reads.
Table of contents
getAppearance
getAppearance: <T extends keyof typeof appearanceRegistry>( appearanceKey: T,) => ApiResource<z.infer<(typeof appearanceRegistry)[T]["schema"]>>Retrieves the appearance configuration for a given key, lazily fetching from the API on first access.
On the first call for a given key the SDK fires a background request. Subsequent calls return the cached ApiResource immediately. The returned object always reflects the current loading/error state.
Parameters
| Name | Type | Description |
|---|---|---|
appearanceKey | keyof typeof appearanceRegistry | The registry key identifying which appearance config to fetch (e.g., "frontend") |
Returns ApiResource<T> — data is undefined while loading, then holds the typed appearance payload once resolved.
Related
addonsSubstore.getAddons— same lazy-fetch pattern for addonsoptionsSubstore.getOption— same lazy-fetch pattern for optionslocalizationSubstore.selectedLanguage— language slug used when building the API requestformSubstore.fromConfigs—debugHistoryvisibility is controlled bygetAppearance("frontend").data?.frontendDebugMode