Skip to content

HydrationSchema · Next.js server API

type HydrationSchema = Readonly<Record<string, Token<Hydratable<Serializable>>>>;

Named hydratable tokens that define a client-boundary snapshot shape.

Use it with satisfies to validate the schema without losing literal keys or token-specific snapshot inference.

const hydration = {
user: USER_STATE,
} satisfies HydrationSchema;