ilokesto

ClientOnly

ClientOnly renders children only after mount on the client. Shows fallback (default null) during SSR and the first client render, avoiding hydration mismatches for browser-only UI.

import { ClientOnly } from '@ilokesto/utilinent';

<ClientOnly fallback={<Skeleton />}><HeavyChart /></ClientOnly>

Props

PropTypeDescription
childrenReactNodeRendered after mount.
fallbackReactNodeRendered during SSR / before mount. Defaults to null.

On this page