'use client'; import { NextLogo } from '#/components/next-logo'; import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/solid'; import clsx from 'clsx'; import { useState } from 'react'; import Byline from '#/components/byline'; import { delayRecommendedProducts, delayReviews, delayShippingEstimate, } from '#/lib/delay'; export function Sidebar() { const [isOpen, setIsOpen] = useState(false); return (

Partial Prerendering

Pink dots{' '} denote artificially delayed responses for demo purposes:

  • Shipping estimate → {delayShippingEstimate}ms
  • Recommended products → {delayRecommendedProducts}ms
  • Reviews → {delayReviews}ms

Partial Prerendering {' '} combines ultra-quick static edge delivery with fully dynamic capabilities. This is different from how your application behaves today, where entire routes are either fully static or dynamic.

How it works:

  • A static route shell is served immediately, this makes the initial load fast.
  • The shell leaves holes where dynamic content (that might be slower) will be streamed in to minimize the perceived overall page load time.
  • The async holes are loaded in parallel, reducing the overall load time of the page.

Try refreshing the page to restart the demo.

); }