A senior engineer's comparison of Shopify Hydrogen and Next.js for headless commerce. Architecture trade-offs, rendering strategies, SEO, hosting, and a decision framework based on shipped projects.

If you are reading this, you have already decided headless is on the table. The remaining question is which stack to commit to. Shopify pushes Hydrogen as the official path. The wider React ecosystem keeps pulling teams toward Next.js. Both will ship a fast storefront. They are not interchangeable.
This post is the long version of an argument we have with founders and CTOs every month: where each framework actually wins, where it bites you 6 months in, and how we pick one over the other when scoping a Sentinu engagement.
If your storefront is "Shopify catalog plus marketing pages plus checkout", with no other commerce backend in the picture, Hydrogen is the right default in 2026. The Storefront API integration, the caching primitives, and the Oxygen edge runtime are tuned for exactly that shape of project.
If you have a heterogeneous backend (a separate PIM, a marketplace layer, multi-region inventory pulled from an ERP, a marketing site that significantly outweighs the store, or an existing Next.js codebase), Next.js is the right default, with Shopify acting as one data source among several.
Everything below is the reasoning behind those two sentences.
Hydrogen is Shopify's React framework, currently built on top of Remix (and therefore on top of React Router v7's data APIs). It ships with:
storefront client wired to the Shopify Storefront APICacheLong, CacheShort, CacheNone, custom strategies) tied to the runtimeThe key thing to understand: Hydrogen is not just "Next.js with a Shopify SDK pre-installed". It is opinionated about how you talk to the Storefront API, how you cache GraphQL responses, and how you deploy. Those opinions are mostly correct for a Shopify-first project, and they cost you flexibility when the project is not Shopify-first.
// Hydrogen route loader: typed, cached, edge-runtime native
export async function loader({ context, params }) {
const { product } = await context.storefront.query(PRODUCT_QUERY, {
variables: { handle: params.handle },
cache: context.storefront.CacheLong(),
});
if (!product) throw new Response(null, { status: 404 });
return { product };
}That cache: CacheLong() line is the entire point. You are not writing your own ISR logic, your own SWR, your own Redis layer. You are using a runtime that understands "this is a product page, here is how Shopify wants it cached".
Next.js (App Router, 15+) is platform-agnostic. Shopify is just one of N possible data sources. That neutrality is exactly the feature and the bug.
What you gain:
What you give up:
CacheLong() gives you in Hydrogen.The "Next.js is more flexible" argument is true and frequently misused. Flexibility you do not need is technical debt you have to maintain. If your project genuinely needs the flexibility, take it. If you are choosing Next.js because the team is more familiar with it, that is a reasonable answer too, just be honest that you are paying for re-implementing Hydrogen primitives.
Both frameworks can ship sub-second LCP storefronts. The question is how much work it takes to get there.
| Concern | Hydrogen | Next.js |
|---|---|---|
| Default rendering | Streaming SSR with route loaders | RSC + streaming, ISR/PPR available |
| Cache primitives for commerce | Built in (CacheLong, sub-request cache) | Build it yourself (fetch cache + revalidateTag) |
| Edge deployment | Oxygen, native, no config | Vercel Edge, Cloudflare Workers, others |
| Bundle size for product page | Small, opinionated stack | Depends on what you import |
| Image optimization | Shopify CDN + <Image> from Hydrogen | next/image with custom loader for Shopify CDN |
In practice both can hit a green Core Web Vitals profile. The difference shows up in maintenance, six months later, when someone needs to invalidate the homepage hero after a marketing edit. In Hydrogen it is a webhook plus a cache tag. In Next.js it is the same idea but you are wiring it yourself.
This is the most common objection we hear from founders considering headless: "Won't Google struggle with a React storefront?" No, if you do it correctly. Both frameworks render server-side by default. Both produce HTML that Googlebot can crawl on the first pass without executing JavaScript.
Where the SEO risk actually sits:
app/sitemap.ts. Both are fine.If you are migrating from a Liquid theme, the SEO risk is in the redirect strategy and the URL structure, not in the rendering framework. We cover that in our Shopify migration guide.
This is the most underrated part of the decision.
Hydrogen runs best on Oxygen. Oxygen is integrated with the Shopify admin, it does deployment previews per branch, and the runtime is V8 isolates so cold starts are not a thing. You can technically deploy Hydrogen elsewhere, but you lose the cache plumbing and you are off the supported path. For a Shopify-first project, that lock-in is acceptable because the platform you are locked into is the same platform your checkout runs on.
Next.js runs anywhere. Vercel is the path of least resistance and the one Next is engineered against. Cloudflare Workers is increasingly viable. Self-hosted Node behind a load balancer works but you give up a lot of the framework's edge-aware features. AWS via OpenNext is workable but you are now maintaining infrastructure code.
The real question is: do you want one vendor (Shopify, via Oxygen and the Storefront API) or two (Shopify for commerce, Vercel/Cloudflare for the frontend)? Two vendors is more leverage and more surface area to maintain.
Honest take, six months of running both stacks in production:
If your team is going to maintain this code for three years, optimize for who is going to be on call at 2am when a product launch hits the homepage. Hydrogen reduces the surface area they need to understand. Next.js gives them more rope.
It is a fair framework, not a perfect one. Cases where we have moved a project off Hydrogen or recommended against it:
Equally fair. Cases where Next.js is the wrong choice for a Shopify storefront:
When scoping a headless project at Sentinu, we score four axes from 0 to 3 and let the total decide:
Score 8 or higher: Hydrogen. Score 5 or lower: Next.js. The middle band (6 to 7) is where the actual conversation happens, and where the answer usually depends on hiring plans and how much custom integration the rest of the business already has.
Both, with a strong default toward Hydrogen for Shopify-first projects. Recent engagements:
We do not have a religious preference. We have a checklist, and the checklist usually decides before the founder finishes describing the project.
Yes. The Remix-based version is stable, deployed across thousands of Shopify Plus stores, and the cache and Customer Account APIs have matured significantly. The earlier "v1" Hydrogen built on Vite-only patterns is deprecated, do not start a new project on it.
Technically yes, in practice you are off the supported path and you lose Oxygen's integrated cache. For a serious project we would either commit to Oxygen or use Next.js. The middle path is the worst of both worlds.
No. SEO performance comes from rendering strategy and discipline, not the framework choice. Both ship server-rendered HTML by default. Both can be misconfigured.
Hydrogen v2 (Remix-based, now React Router v7 era) is the only version we recommend starting on today. v1 is end of life. If you are on v1, plan a migration on the next quarterly cycle.
Hydrogen is the official React framework, Oxygen is a first-party Shopify product, and the storefront-focused launches at Shopify Edition events keep pointing at the same stack. The risk of Shopify abandoning it is low. The risk of the framework evolving and forcing migration work is real, the same as any actively developed framework.
In our experience, a Hydrogen project for a Shopify-first store is about 15 to 25 percent faster to ship than the equivalent Next.js project, mostly because you are not writing the Shopify integration layer. That gap closes if the team has heavy Next.js experience and no Shopify experience.
If you are evaluating a headless rebuild, the two pieces worth reading after this are our Headless Shopify service overview for the engineering approach, and our Shopify speed optimization page for how we measure the wins after launch.
If you would rather skip the reading and have a thirty-minute architecture conversation, that is what we are here for.

A senior engineer's guide to building a B2B wholesale portal on Shopify Plus. Company accounts, custom catalogs, net terms, the limits of native features, and the decision framework for when to extend with custom development.

A senior engineer's deep dive into Shopify Functions in 2026. The five extension points, what each one solves, when Functions beat apps, when apps beat Functions, and how Functions fit alongside headless storefronts.

A senior engineer's audit checklist for Shopify Core Web Vitals in 2026. How to diagnose INP, LCP and CLS issues, find the apps that are bleeding your performance, and fix them without breaking the store.