Hooks - Admin Components
Note: These hooks are available since Medusa v2.21.0.
The @medusajs/dashboard/hooks subpath exports the React hooks that the Medusa Admin uses to fetch data and build its UI. Use them in your widgets and UI routes.
Tip: Refer to the Components reference for the components that pair with these hooks.
API Hooks#
Use these hooks to fetch or mutate data from the Medusa backend. They are built on TanStack Query and follow the same patterns used throughout the Medusa Admin.
Each resource also exports a query key factory, which you use to invalidate the resource's cached queries after a mutation.
Utility Hooks#
Was this page helpful?