import { useCanUseDOM } from "@dreamy-ui/react";
useCanUseDOM
returns a boolean value, which tells, if user has hydrated.
Refresh the page to see the effect. It will be false
initially and true
after hydration.
Can use DOM: No
export function useCanUseDOM() {
const canUseDOM = useCanUseDOM();
return <Text>Can use DOM: {canUseDOM ? "Yes" : "No"}</Text>;
}