Decide what is critical
A product page generally needs enough information to identify the product and make a purchase decision. Reviews, recommendations, and decorative content may be secondary. This is a product decision as well as a technical one.
Start requests that can run independently as early as practical. Await critical data and define visible fallbacks for delayed content. Do not claim that sending an earlier first byte means the page is fully loaded.
Give secondary data its own failure state
This framework-neutral helper starts two independent operations and contains failures from optional content. A route adapter must render the returned promise using the streaming facilities supported by the application’s exact framework version. It is not a drop-in Hydrogen loader.
Keep the primary product failure explicit. A missing product should produce the appropriate route response; a reviews failure should not silently erase the product page.
export async function loadProductView(loadProduct, loadReviews) {
const productRequest = Promise.resolve().then(loadProduct);
const reviews = Promise.resolve().then(loadReviews).then(
items => ({status: "ready", items}),
() => ({status: "unavailable", items: []})
);
const product = await productRequest;
if (!product) throw new Error("Product not found");
return {product, reviews};
}Illustrative request orchestration. Pass the correct API clients and router response handling.
Cache deliberately and measure separately
Public product content and personalized cart/account responses have different isolation needs. Define cache keys, expiration, invalidation, and ownership before enabling a shared cache. Never copy public cache headers onto an authenticated response.
Measure TTFB, LCP, client work, and interaction responsiveness separately. Reserve dimensions for delayed media, show accessible fallback content, and reconcile optimistic cart feedback with the actual mutation result.
Sources & review
The timing comparison is conceptual. Previous load-time and add-to-cart benchmarks were removed because their measurement evidence was not supplied. The example uses standard promises and requires an adapter for the application’s pinned router version.
Content reviewed 2026-09-08. No production benchmark is claimed.
