Skip to content

loadTheme

loadTheme(opts, onUpdate?): Promise<RevTurbineTheme>

Load the tenant’s theme:

  1. Return the locally-persisted theme immediately (fast path).
  2. Fetch the latest from the API in the background.
  3. If the remote version differs, update local storage and return the new theme.

Returns a resolved RevTurbineTheme (merged with defaults). Also provides an onUpdate callback callers can use to react to background refreshes.

ThemeLoaderOptions

(theme) => void

Promise<RevTurbineTheme>