Weaverse LogoWeaverse
Paul Phan
7 mins read

React Router vs Next.js for Shopify Hydrogen: Which Fits Your Storefront Team in 2026

Compare React Router and Next.js for Shopify Hydrogen: routing, hosting, RSC, and visual editing. Choose the stack that fits your storefront team.
#javascript#web-development#reactjs#shopify#nextjs
React Router vs Next.js for Shopify Hydrogen: Which Fits Your Storefront Team in 2026
Table of Contents

Update, November 9, 2026: This comparison was first published in April 2026, when Hydrogen was a React Router framework. Starting with version 2026-10, Shopify documents Hydrogen as a headless toolkit that works with Next.js, React Router and other frameworks, and its starter templates now include a Next.js option. The article has been rewritten around that change. Claims that Next.js works against Hydrogen, that it only works well on Vercel, and that React Router is a drop-in replacement for every Next.js feature have been removed because current documentation does not support them.[1][2]

The short answer

For a new Shopify storefront in 2026, both frameworks are supported ways to build with Hydrogen. Pick the one your team already knows and the host you want to run on:

  • Choose React Router if you want the template Shopify maintains, deployment to Oxygen through the Hydrogen channel, and a loader and action data model.[3]
  • Choose Next.js if your team already ships Next.js App Router apps, you want the Vercel Shop template on Vercel, or you plan to self-host Next.js and can own its caching setup.[3][4]
  • Stay on React Router for now if you run a production storefront on Hydrogen 2026-04 or earlier. That version is built on Remix or React Router. Moving to the 2026-10 toolkit is a planned migration, not a framework switch you get for free.[2]

The rest of this article explains the differences that should drive that choice.

Developer workspace with code on screen

Two kinds of Hydrogen

Most comparisons still treat "Hydrogen" as one thing. Shopify's documentation now separates two versions:

Hydrogen 2026-04 and earlier (legacy)Hydrogen 2026-10
What it isA full-stack framework built on Remix or React RouterA toolkit you add to a framework
FrameworkRemix or React RouterNext.js, React Router or another framework
UIHydrogen components such as Image and MoneyYour own components, with helpers such as formatMoney()
HostingOxygen, or self-hosted with an adapterThe hosts your framework supports

Source: Shopify's Legacy Hydrogen documentation.[2]

In the 2026-10 model your framework owns routing, rendering, data loading and UI. Hydrogen owns the Shopify-specific parts: the Storefront API client, the cart, variant selection, analytics, and request handlers for routes such as /api/cart and /checkout.[1] That split is why "React Router or Next.js" is now a framework decision rather than a decision about whether you can use Hydrogen at all.

Shopify's deploy guide offers two starter templates built on Hydrogen:[3]

TemplateFrameworkHostingMaintained by
React RouterReact Router 7OxygenShopify
Vercel ShopNext.js 16 App RouterVercelVercel

Routing and data loading

The two frameworks organize server work differently, and that difference shows up in every page you build.

React Router gives each route a loader for reads and an action for writes. After an action completes, React Router revalidates the loaders on the page.

// React Router: route loader
export async function loader({ params }: Route.LoaderArgs) {
const product = await getProduct(params.id);
return { product };
}
export default function Product({ loaderData }: Route.ComponentProps) {
const { product } = loaderData;
return <h1>{product.title}</h1>;
}

Next.js App Router makes React Server Components the default. Components fetch data on the server, "use client" marks interactive components, and Server Functions handle writes. Caching and revalidation are explicit framework features that you configure.

Neither model is objectively simpler. Teams that already think in loaders and actions tend to move faster in React Router. Teams that already build with Server Components and the App Router tend to move faster in Next.js. Hiring and existing code usually matter more than the API shape.

React Server Components

This is the clearest technical difference today.

  • In Next.js, Server Components are the default model of the App Router.
  • In React Router, RSC support exists in both Framework and Data modes, but the React Router documentation labels it experimental and subject to breaking changes in minor and patch releases.[5]

If your design depends on Server Components today, Next.js is the framework where they are the default rather than an experimental feature. If you prefer loaders and actions and do not need RSC, React Router's stable path does not require it.

Security follows the versions you run, not the framework name. When an RSC vulnerability is published, check whether your framework and React versions are listed and patch them. Our write-up of CVE-2026-23869 walks through that check for Hydrogen storefronts.

Two framework options side by side

Hosting and operations

React Router on Oxygen. The Hydrogen channel creates a GitHub repository from the React Router template, connects it to your store and deploys to Oxygen on every push.[3] With the 2026-10 toolkit, your framework determines where you can deploy.[2]

Next.js on Vercel or your own servers. Vercel Shop deploys to Vercel. Next.js also documents self-hosting with next start, where image optimization, Proxy, streaming and after work without extra configuration.[4] The responsibilities move to you when you scale out:

  • The default server cache is local to each instance and works automatically for a single next start instance with persistent disk. For consistent caching across multiple instances, configure shared storage and tag coordination. Ephemeral compute needs an appropriate persistence strategy, while a CDN or reverse proxy must honor Next.js cache headers and cache-key variability.[4]
  • All instances need the same Server Functions encryption key and build, or you will see errors and version skew during rolling deploys.[4]
  • Proxies and load balancers must pass streaming responses through without buffering.[4]

Self-hosted Next.js is supported. It is also operating work your team must plan, test and own.

Comparison summary

QuestionReact RouterNext.js
Shopify starter templateReact Router template, maintained by ShopifyVercel Shop, maintained by Vercel
Default host in Shopify's guideOxygenVercel
Data modelRoute loaders and actionsServer Components, Server Functions and framework caching
React Server ComponentsExperimentalDefault in the App Router
Self-hostingSupported on hosts the framework supportsSupported; shared cache and multi-instance setup are your responsibility
Legacy Hydrogen (2026-04 and earlier)Built on itNot available

Visual editing with Weaverse

Weaverse ships one package with framework-specific entries: @weaverse/hydrogen/react-router for React Router, @weaverse/hydrogen/next for the Next.js App Router and @weaverse/hydrogen/next/server for server-only code. The Next.js adapter moved into that package in SDK 6.2.0; @weaverse/next is deprecated. Both adapters connect a storefront to Weaverse Studio, where merchants edit sections and theme settings.[6] The current stable SDK, @weaverse/hydrogen@6.3.1, requires @shopify/hydrogen 2026.10.3 or later; its Next.js peer remains version 14 or later.[7][8]

Documented support means the adapter is designed for that framework. It does not mean your storefront has been migrated or tested. Moving an existing legacy storefront still needs its own migration plan and user acceptance testing.

Online storefront on a laptop

The bottom line

The framework question for Shopify storefronts is no longer whether Hydrogen allows it. Shopify documents both React Router and Next.js for Hydrogen 2026-10. Choose React Router for Shopify's own template and Oxygen. Choose Next.js if your team already works in the App Router, you want Server Components as the default rather than an experimental feature, or you host on Vercel or run your own Next.js infrastructure. If you already run legacy Hydrogen, treat the move to 2026-10 as a separate project.


Building a Shopify Hydrogen storefront? Weaverse adds visual editing to Hydrogen storefronts on React Router or Next.js. Browse the themes →

Sources

  1. Shopify docs: Hydrogen
  2. Shopify docs: Legacy Hydrogen
  3. Shopify docs: Deploy a template
  4. Next.js docs: How to self-host your Next.js application
  5. React Router docs: React Server Components
  6. Weaverse docs: Weaverse for Next.js
  7. npm: @weaverse/hydrogen 6.3.1 manifest
  8. Weaverse SDK 6.2.0: unified Next.js adapter

Reactions

Like
Love
Celebrate
Insightful
Cool!
Thinking

About the author

Paul Phan

CEO

Paul is the founder of Weaverse, the AI-powered visual page builder for Shopify Hydrogen. He works on the intersection of headless commerce, AI tooling, and developer experience, turning fast storefronts into something a merchant can actually edit.

Join the Discussion

Need a senior Hydrogen team?

Weaverse builds Shopify Hydrogen storefronts, with scope, delivery and launch support agreed in a written statement of work.

  • Pull-request workflow
  • Written statement of work
  • Launch support by agreement

Never miss an update

Subscribe to get the latest insights, tutorials, and best practices for building high-performance headless stores delivered to your inbox.

Join the community of developers building with Weaverse.