Building Fast E-commerce Frontends with Next.js
Commerce frontends live and die by perceived speed. How server components, smart caching, and disciplined hydration turn catalogs into conversion.
Tanjil Ahmed
Lead Software Engineer · Notionhive
In e-commerce, speed is not a technical metric — it's a business one. Every additional second of load time measurably cuts conversion. When we rebuilt a multilingual fashion storefront on Next.js backed by a Laravel API, the frontend architecture was driven by one question: what does the customer see, and how fast?
Server-first by default
Product listing and detail pages are server components. The catalog data is fetched close to the API, rendered to HTML, and streamed to the browser — no client-side data fetching waterfall, no skeleton screens for content we already know. Interactivity is added surgically: the cart button, the variant picker, the image gallery. Everything else ships as plain HTML.
Cache like a merchandiser thinks
- Product pages revalidate on a timer and instantly on demand when merchandising updates a product.
- Prices and stock are fetched per-request or streamed in, never baked into long-lived caches.
- The cart is fully dynamic — it belongs to the user, not the cache.
- Search results cache briefly per query; filters compose on the server.
This split — static shell, fresh commerce data — is the entire game. Customers get instant navigation between products while stock and pricing stay trustworthy.
The hydration budget
Every client component is JavaScript the customer's phone must parse before the page feels alive. We kept a literal budget: the product page ships interactive islands for gallery, variants, and cart, and nothing else. Animations run on CSS and transforms. Third-party scripts load after interaction. The result was a storefront that feels native-app fast on mid-range Android devices — where most of the actual customers are.
Your Lighthouse score in the office means nothing. Your Time-to-Interactive on a $150 phone on 4G is the real storefront.