Wocart

@wocart/theme v4.1.0


@wocart/theme / index / LoadContext

Interface: LoadContext<P>

What a load hook receives. Server-only; reads go through the storefront SDK.

Type Parameters

P

P = Record<string, unknown>

Properties

context

context: ThemeRenderContext


props

props: P

The resolved field values for this instance.

The renderer merges load's return value over these ({ ...props, ...loaded }), so a load-returned key wins over a field of the same name. A definition whose component reads a prop from load should keep that name out of fields.


reads

reads: ReadCache


storefront

storefront: object

cart

cart: CartNamespace

categories

categories: CategoriesNamespace

collections

collections: CollectionsNamespace

config

config: ConfigNamespace

geo

geo: GeoNamespace

menus: MenusNamespace

orders

orders: OrdersNamespace

pageData

pageData: PageDataNamespace

pages

pages: PagesNamespace

products

products: ProductsNamespace

shipping

shipping: ShippingNamespace