Setting the file. One moment.
Subchapter 1.72
references/context-provider/vertical-contexts/stores/category-by-id.mdMarkdown1 KBView on GitHub
@wix/stores/context/category-by-idRead Importing a Context in Code first. Import only the hook, from .
@wix/stores/context/category-by-idLoads a category by ID and supplies its category info and product list contexts.
import { CategoryByIdContextProvider } from '@wix/stores/context/category-by-id';__0: CategoryByIdContextProviderPropsElement \| nullimport { CategoryByIdContextValues } from '@wix/stores/context/category-by-id';__0: CategoryByIdContextValuesPropsElementReserved hook. Always throws; read useProductListContext and useCategoryInfoContext instead.
import { useCategoryByIdContext } from '@wix/stores/context/category-by-id';never| Property | Type | Description |
|---|---|---|
categoryId | string | undefined | |
productsPerPage | number | undefined | How many products each page request fetches. Declared as a manifest data prop. |
children | ReactNode |
| Property | Type | Description |
|---|---|---|
categoryValue | CategoryInfoContextValue | |
productListValue | ProductListContextValue | |
children | ReactNode |