User Hooks - Admin Components
Note: These hooks are available since Medusa v2.21.0.
The user hooks retrieve admin users from the Medusa backend, such as the user that created an order edit or the user assigned to a task.
These hooks are built on TanStack Query. Use them in your widgets and UI routes.
useUser#
Retrieve a single admin user by its ID. Pass a query object as the second parameter to select the fields and relations to retrieve.
Parameters#
Loading...
Note: This hook retrieves the user with the specified ID, not the currently authenticated user.
Returns#
Along with the following, the hook returns the rest of TanStack Query's useQuery result.
Loading...
Was this page helpful?