Loading...
Loading...
Loading...
Returns true after the component has mounted. Use to guard browser-only rendering.
Install
npx bouncekit@latest add usemountedImport
import { useMounted } from "@/hooks/use-mounted.ts"import { useMounted } from "@/hooks/use-mounted"
const mounted = useMounted()
if (!mounted) return null
// Guard browser-only rendering.API Reference
Extends native HTML attributes — no custom props.
Source
src/hooks/use-mounted.ts