Skip to content

useShopwareContext

useShopwareContext

Types

ts
export function useShopwareContext(): ShopwareContext

source code

ts
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;
};

source code

Was this page helpful?
UnsatisfiedSatisfied
Be the first to vote!
0.0 / 5  (0 votes)