Setting the file. One moment.
Subchapter 1.82
references/context-provider/vertical-contexts/stores/product-by-id.mdMarkdown1 KBView on GitHub
@wix/stores/context/product-by-id (part 1 of 6)This context’s reference is split across 6 files: product-by-id.md, , , , , .
Read Importing a Context in Code first. Import only the hook, from @wix/stores/context/product-by-id.
Loads a product by ID and supplies its details and purchase actions to descendants.
import { ProductByIdContextProvider } from '@wix/stores/context/product-by-id';__0: ProductByIdContextProviderPropsReactNodeReads the product context for the configured product.
import { useProductByIdContext } from '@wix/stores/context/product-by-id';ProductContextValue| Property | Type | Description |
|---|---|---|
productId | string | undefined | |
children | ReactNode |