Officina UI
Components

NoSsr

Defers rendering its children until after mount, skipping them during SSR.

NoSsr renders fallback (or nothing) on the server and on first client render, then swaps to children once the component has mounted in the browser. Use it to wrap content that touches the DOM during render — charts (ECharts reads getComputedStyle), anything depending on window, or values that would otherwise mismatch between server and client and trigger a hydration warning.

Example

Preview
import { NoSsr, Skeleton } from '@officina/ui';

<NoSsr fallback={<Skeleton height={28} />}>
  <ClientOnlyWidget />
</NoSsr>;

API

PropTypeDefaultDescription
fallbackReactNode—

On this page