useUser hook returns session-stable user information. These values are set once at initialization and do not change during the session.
Basic usage
Returns
locale
The user’s locale string in BCP 47 format (e.g., "en-US", "fr-FR", "ja-JP").
userAgent
Information about the user’s device and its capabilities.
userAgent.device.type
The type of device the user is on:
mobile- Mobile phonetablet- Tablet devicedesktop- Desktop or laptop computerunknown- Unable to determine device type
userAgent.capabilities.hover
Whether the device supports hover interactions (typically true for desktop, false for touch-only devices).
