Skip to content
On this page

useShopwareContext ​

Definition ​

Basic usage ​

ts
const { 
 apiInstance,
 devStorefrontUrl,
 apiClient 
} = useShopwareContext();

Signature ​

ts
export function useShopwareContext(): ShopwareContext 

Return type ​

See ShopwareContext
ts
export type ShopwareContext = {
  /**
   * Shopware API instance
   * @deprecated use `apiClient` instead
   */
  apiInstance: any;
  devStorefrontUrl: string | null;
  /**
   * Shopware API client
   */
  apiClient: ApiClient;
};

Properties ​

NameTypeDescription
apiInstance
any
Shopware API instance
devStorefrontUrl
string | 
apiClient
ApiClient
Shopware API client
useShopwareContext has loaded