The Open Standard for Generative UI
"use client";
import { useSyncExternalStore } from "react";
const subscribe = () => () => {};
const getClientSnapshot = () => true;
const getServerSnapshot = () => false;
/** Returns false during SSR and the hydration pass, then true on the client. */
export function useHasMounted() {
return useSyncExternalStore(subscribe, getClientSnapshot, getServerSnapshot);
}