useShopwareContext
Category:
Context & Language
Types
ts
export function useShopwareContext(): ShopwareContextts
export type ShopwareContext = {
devStorefrontUrl: string | null;
/**
* Shopware API client
*/
apiClient: ApiClient;
/**
* Browser locale, working in SSR
* If not provided, it will be "en-US"
*/
browserLocale: string;
/**
* When `true`, composables read data through the cacheable GET variants of
* the Store API (criteria compressed into the `_criteria` query param)
* instead of POST, so the responses can be cached by HTTP infrastructure
* (CDN, reverse proxy, browser). Requires a backend that supports the GET
* read routes.
*
* @default false
*/
cacheableReads: boolean;
};