- Overview
- Introduction to Cal.com Atoms
- Setup
- Apple calendar connect
- Availability settings
- Booker Embed
- Booker
- Bookings hooks
- Cal OAuth Provider
- Cal Provider
- Calendar settings
- Calendar view
- Calendars hooks
- Conferencing Apps
- Create schedule
- Event Type
- Event types hooks
- FAQ
- Google calendar connect
- List Event Types
- List schedules
- Onboarding Embed
- Outlook calendar connect
- Payment form
- Quickstart
- Stripe Connect
- Troubleshooter
- User / Teams hooks
Atoms guides
Platform
- Bookings hooks
- Calendars hooks
- Event types hooks
- FAQ
- Introduction
- Quickstart
- User / Teams hooks
- Apple calendar connect
- Availability settings
- Booker Embed
- Booker
- Cal OAuth Provider
- Cal Provider
- Calendar settings
- Calendar view
- Conferencing Apps
- Create schedule
- Event Type
- Google calendar connect
- List Event Types
- List schedules
- Outlook calendar connect
- Payment form
- Stripe Connect
- Troubleshooter
- Managing booking fields
- Booking redirects
- Custom booking flow
- Custom slot selection flow
- Global event types
- Managed organizations
- Custom toasts
- Configuring your team
User hooks
Archived Cal.com Atoms documentation for User hooks. These deprecated SDK components are no longer maintained.
1. useMe
The useMe returns the current user's info. This hook is useful when you need to display a user's details.
Below code snippet shows how to use the useMe hook to fetch user details.
import { useMe } from "@calcom/atoms";
export default function UserDetails() {
const { data: userData, isLoading: isLoadingUser } = useMe();
return (
<>
{isLoadingUser && <p>Loading...</p>}
{!isLoadingUser && !userData && <p>No user found</p>}
{!isLoadingUser &&
!!userData &&
return (
<div>Username: {userData.username}</div>
)
}
</>
);
}Last updated
On This Page