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.

Code
import { useProducts } from "@medusajs/dashboard/hooks"
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.

Customers
Orders
Products
Product Variants
Promotions
Regions
Sales Channels
Shipping Options
Price Preferences
Store
Users

Utility Hooks#

useComboboxData
useDate
useDebouncedSearch
useQueryParams
Data Table Hooks
Was this page helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Docs MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break
⇧↵