Guides
Server rendering
What the server can draw, providing Temporal at startup and client hydration.
Provide Temporal at startup
For exact recurrence and DST layout, provide Temporal before the first calendar call. In Next.js that can be instrumentation.ts; anywhere else it is the entry point.
// instrumentation.ts (or server entry) import 'temporal-polyfill/global' export const register = async (): Promise<void> => { // Temporal is now available on globalThis for server rendering }
Check globalThis.Temporal in the server runtime. When it is absent, importing temporal-polyfill/global provides globalThis.Temporal synchronously before any calendar calls are made.
What the server sends
A calendar is plain JSON, so everything the layout needs is computed on the server and rendered as markup: day headings, slot rows, bars and boxes, all positioned. Only two things are client-side by nature — Calendar.NowMarker, which reads the wall clock, and any scroll TimeGrid performs on mount.
Hydration
On browsers without native Temporal like Safari, import temporal-polyfill/global before hydration in your client entry module. Having the polyfill in place ensures exact recurrence expansion and DST layout on first paint without hydration mismatches. See Temporal & Safari.
// Application entry / hydration import 'temporal-polyfill/global' import { hydrateRoot } from 'react-dom/client' import { Board } from './board' const container = document.querySelector('#root') if (container) hydrateRoot(container, <Board />)