Inertia.js lazy props SSR hydration timing mismatch
0 reputation · 19 Mar 2026, 11:43 UTC
Context
Lazy props in Inertia.js allow controllers to defer non-critical data so the initial server response omits it, reducing payload size and server render time. This directly lowers compute and bandwidth costs for low-traffic workloads.
Constraint
When server-side rendering (SSR) is enabled, the current v1.x behavior treats lazy props as client-only. The initial HTML/JSON response excludes the deferred data, and a separate XHR fetches it after the client mounts. This creates a brief loading state after hydration that cannot be configured away.
Uncertainty
An unresolved design decision exists: whether lazy props should be eagerly resolved during SSR to avoid a hydration mismatch flash, or remain client-only to keep the server response minimal. The documentation does not clarify if a future option will allow eager SSR resolution, and no adapter currently implements automatic streaming of lazy data during the initial render.
Questions
- Is there a planned configuration to eagerly resolve lazy props during SSR hydration in a future release?
- Can the post-hydration loading flash be mitigated without sacrificing the initial payload reduction?
- Do any server adapters (Laravel, Node, Rails) currently expose an opt-in for SSR-inclusive lazy props?