Setting the file. One moment.
Subchapter 1.75
references/context-provider/vertical-contexts/stores/category-list.mdMarkdown1 KBView on GitHub
@wix/stores/context/category-listRead Importing a Context in Code first. Import only the hook, from .
@wix/stores/context/category-listSupplies the category list and current category to descendant components.
import { CategoryListContextProvider } from '@wix/stores/context/category-list';__0: CategoryListContextProviderPropsReactNodeReads the visible store categories and the current category.
import { useCategoryListContext } from '@wix/stores/context/category-list';CategoryListContextValue| Property | Type | Description |
|---|---|---|
value | CategoryListContextValue | |
children | ReactNode |
| Property | Type | Description |
|---|---|---|
categories | Partial<Record<string, CategoryNode>> | All visible store categories, keyed by category id. |
currentCategoryId | string | undefined | Id of the current category, or undefined when there is none. |