Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Zalando Engineering 16 min read Case study mediumAdept

Rendering Engine Tales: Road to Concurrent React

Zalando migrated its Rendering Engine framework, which renders the Fashion Store from backend-defined Entity trees mapped to React Renderers, to React 18 concurrent rendering. Each Renderer is wrapped in a Suspense boundary. Data resolution, ordering and transitions live in a central Application State layer outside React, and a Connector hook suspends components until their data is written. This mixed design was chosen because SuspenseList is still experimental, useTransition ignores nested Suspense boundaries, and Render-As-You-Fetch hooks couple fetch timing to render order. Switching to renderToPipeableStream and hydrateRoot alone, rolled out via A/B test, cut INP by 5.69%, FID by 8.81% and LCP by 2.43%. It also exposed many hydration mismatch errors, and the post covers fixes for common causes such as timers, time-zone-dependent date localization and client-only content.

Assumes: React hooksserver-side rendering and hydrationReact Suspense

Related posts

  • Micro Frontends: Deep Dive into Rendering Engine (Part 2)

    Zalando Engineering mediumAdept

    Zalando's Interface Framework replaces Mosaic HTML fragments with Renderers: declarative TypeScript modules that state their data needs as GraphQL queries and render a single Entity type as a React component. A Node.js Rendering Engine maps Entities to Renderers through rendering rules, recursively and asynchronously resolves the entity tree, and streams server-rendered HTML that is later progressively hydrated on the client. A custom React reconciler lets the same Renderers emit JSON layouts for the iOS and Android apps. The engine also handles batched, cached data fetching (DataLoader, Perron circuit breakers), persisted queries, code splitting, Web Vitals collection and Mosaic backward compatibility.

  • Micro Frontends: from Fragments to Renderers (Part 1)

    Zalando Engineering easyNovice

    Zalando replaced its Mosaic micro-frontend architecture, built on team-owned page Fragments, with Interface Framework, a unified platform where pages are trees of typed Entities (Product, Collection, Outfit) mapped via declarative rendering rules to React Renderers that declare data needs in GraphQL. A Node.js/browser Rendering Engine resolves and renders the Entity tree chosen by the recommendation system, with built-in monitoring, batched A/B testing, deployment previews against production, and performance gates such as Lighthouse CI, bundle size limits and Web Vitals reporting. Moving teams into a monorepo with a shared stack lowered the entry barrier and improved UX consistency, at the cost of blurred ownership. A hybrid mode serving Fragments and Renderers together eased migration, and about 90% of traffic now runs on IF.

  • How We Built Hydrogen: A React Framework for Building Custom Storefronts

    Shopify Engineering mediumAdept

    Hydrogen, Shopify's React framework for custom storefronts, was built on React Server Components, React 18 streaming SSR and Vite, chosen over static JAMStack approaches because commerce pages are inherently dynamic. Component-level data fetching replaced route loaders, and a preload cache hoists nested queries so they run in parallel instead of in network waterfalls. Removing bloated exported GraphQL fragments and adding a logger for unused query fields cut some demo store route load times in half. Rigid "magical" context-based components were dropped in favor of leaner primitives, and the team describes its early reverse-engineered RSC implementation and collaboration with the React, Vite, Vercel and Cloudflare teams.

  • Building Blocks of High Performance Hydrogen-powered Storefronts

    Shopify Engineering easyNovice

    Hydrogen, Shopify's React-based storefront framework, targets the tension between fast loading and personalized, dynamic commerce by combining React 18 streaming SSR with Suspense, React Server Components, cache-aware data fetching, and per-page edge caching. Streaming SSR sends the HTML shell immediately for a fast TTFB, then streams data and progressively hydrates components, avoiding the client-side fetch waterfall that slows LCP under CSR. On Oxygen, a V8 isolate worker runtime colocated with Shopify data, server components query the Storefront API at near-localhost latency, and third-party fetches get default cache keys, TTLs and stale-while-revalidate. Static pages can be served from the CDN edge, with the choice of SSR, client fetching or edge delivery made per page and per component.

  • Rendering huge pull requests in the GitHub Copilot app

    GitHub Engineering mediumAdept

    The GitHub Copilot app's pull request view stays responsive on a 2,200-file, million-line diff with 400+ review comments by splitting document height into two geometries: exact, precomputed prefix-summed code rows and lazily measured dynamic blocks for comments, drafts and composers. A single idle- and scroll-gated measurement pass scoped to about 2400px around the viewport replaces per-block ResizeObserver write-back, which caused feedback loops. Observers only flag blocks for re-measurement, except for user-caused resizes, which commit synchronously at most once per frame. Identity-based scroll anchoring keeps corrections small, and a cache of recent diffs prevents an instantly drawn shell from sitting around an empty diff. Bugs were found with permanent in-app probes asserted as CI budgets and an autonomous headless change→measure→improve loop.

The quest for software engineering knowledge.

Look:
Layout: