Interface: UseMenuReturn
Defined in: composables/react/useMenu.ts:54
State and actions returned by useMenu.
Properties
categories
categories:
MenuCategory[]
Defined in: composables/react/useMenu.ts:56
The fetched top-level category tree.
clearCache
clearCache: (
rootCategoryId,language,userKey?) =>void
Defined in: composables/react/useMenu.ts:64
Removes the cached menu entry for the given root category / language / user.
Parameters
rootCategoryId
number
language
string
userKey?
string
Returns
void
error
error:
string|null
Defined in: composables/react/useMenu.ts:60
Last error message, or null.
fetchMenu
fetchMenu: (
rootCategoryId,userKey?) =>Promise<void>
Defined in: composables/react/useMenu.ts:62
Fetches the category tree for a root category id; userKey scopes the cache.
Parameters
rootCategoryId
number
userKey?
string
Returns
Promise<void>
loading
loading:
boolean
Defined in: composables/react/useMenu.ts:58
true while a menu fetch is in flight.