Skip to content
On this page

useShopwareContext

Definition

Basic usage

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

Signature

ts
export function useShopwareContext(): ShopwareContext 

Return type

See ShopwareContext
ts
export type ShopwareContext = {
  /**
   * Shopware API instance
   */
  apiInstance: ShopwareApiInstance;
  devStorefrontUrl: string | null;
};

Properties

NameTypeDescription
apiInstance
ShopwareApiInstance
Shopware API instance
devStorefrontUrl
string | 
useShopwareContext has loaded