useFirstVisit
First user session identifier.
740 B
•Updated on September 3, 2026
Installation
Bash
pnpm dlx shadcn@latest add @spaceui/hooks-lifecycle-use-first-visitUsage
Code
import { useFirstVisit } from '@/hooks/use-first-visit'
const isFirst = useFirstVisit('welcome_popup')API Reference
Parameters / Props
| Parameter | Type | Default | Description |
|---|---|---|---|
key | string | required | Visit key. |
Return Value
| Return Type | Description |
|---|---|
boolean | True on first visit. |