Loading...
Please waitLoading...
Please waitpnpm dlx uselab@latest add use-mounted
import { useMounted } from "@/hooks/use-mounted"
export function Component() {
const isMounted = useMounted()
return (
<div>
<p>{isMounted ? "Component is mounted" : "Component is not mounted"}</p>
</div>
)
}| Name | Type | Description |
|---|---|---|
isMounted | boolean | A boolean value indicating if the component is mounted. |