Skip to main content

Weaverse for Next.js

@weaverse/hydrogen/next is the Weaverse adapter for the Next.js App Router, an entry point of the @weaverse/hydrogen package. It renders Weaverse pages in a Next storefront, connects them to Weaverse Studio for visual editing, and runs your section loaders on the server.
@weaverse/next is deprecated in favour of @weaverse/hydrogen/next and @weaverse/hydrogen/next/server. From @weaverse/hydrogen 6.2.0 the Next.js adapter ships inside @weaverse/hydrogen, which no longer depends on @weaverse/next. To move a storefront off it, remove @weaverse/next from package.json, install @weaverse/hydrogen, and run npx @weaverse/cli@latest migrate v6 to rewrite the imports. See the v6 migration guide.
A Next.js storefront is still a Shopify Hydrogen storefront. Hydrogen is Shopify’s framework-agnostic toolkit for headless commerce, and the React Router template is only one way to use it: the Hydrogen README lists Vercel Shop, a Next.js storefront built on Hydrogen and maintained by Vercel, alongside it. Each layer owns one job:
  • Shopify owns commerce. Products, collections, cart, checkout, customer accounts and markets come from your store through the Hydrogen SDK (@shopify/hydrogen) and the Storefront API.
  • Next.js owns the app. Routing, Server Components, caching and metadata.
  • Weaverse owns the pages. Sections, theme settings, translations and visual editing in Studio.

React Router or Next.js?

Both are Hydrogen storefronts on Shopify, so your component schemas, input settings and theme settings work the same way. @weaverse/hydrogen ships one adapter per framework as an entry point; pick the one your storefront runs on:
  • @weaverse/hydrogen/react-router for the Hydrogen React Router framework, for example a storefront deployed to Oxygen. The package name predates Hydrogen becoming framework-agnostic.
  • @weaverse/hydrogen/next for the Next.js App Router, for example a storefront deployed to Vercel.
What changes is how the framework hands Weaverse a request and renders the page:

Requirements

  • A Shopify store with Storefront API access from the Headless channel or, on a paid Shopify plan, the Hydrogen channel. Use a private token for server reads and a public token so Studio can open default templates.
  • A Next.js App Router app that reads from Shopify, typically through the Hydrogen SDK (npx @shopify/hydrogen@latest setup). Use React 19: @weaverse/hydrogen 6.4.0 and later take react >= 19 and react-dom >= 19 as peer dependencies (earlier 6.x versions install them as regular dependencies), and next >= 14 is an optional peer dependency. 6.4.0 and 6.5.0 also list react-router as a peer, so pnpm and bun install it into a Next.js app; from 6.5.1 it is optional and they don’t.
  • @weaverse/hydrogen 6.2.0 or later (latest 6.5.1). isFallback and the server client’s throwPageLoadFailures option need 6.5.0. 6.3.0 and later need @shopify/hydrogen 2026.10.3 or later as a peer dependency (6.2.x needs 2026.10.0; optional from 6.5.1). 6.0 and 6.1 also have @weaverse/hydrogen/next, but with fewer exports than these guides use.
  • A Weaverse project.
Forward, the Weaverse Next.js starter theme, runs in production on @weaverse/hydrogen/next with Next.js 16, React 19 and the Hydrogen SDK (preview).

What the Next.js Adapter Supports

  • Page rendering: home, product, collection, all products, page, article and custom pages, with section loaders on the server.
  • Studio editing: connect, select, edit and reorder sections in Weaverse Studio, with live theme settings.
  • Per-item revalidation: a resource picker edit re-runs only that section’s loader. See Studio integration.
  • Theme settings: one root store shared by global components (header, footer) and every page.
  • Markets and translations: localized pages per market and the Translation Manager. See Markets & translations.
  • Custom pages and SEO: custom pages, sitemap data, and page SEO mapped to Next Metadata. See Rendering pages.
  • Theme routes: tell Studio which paths your storefront uses when they differ from Shopify’s.

Known limitations

  • publicEnv in the root layout. The SDK attaches publicEnv to the theme settings response only in design mode, which it reads from ?isDesignMode=true. A Next layout receives no search params, so pass publicEnv to WeaverseNextRootProvider yourself. Studio needs PUBLIC_STORE_DOMAIN and PUBLIC_STOREFRONT_API_TOKEN from it to open your store’s default product, collection and page.
  • Shopify redirects and request handling are part of your app, not the SDK. Add the redirects your storefront needs in next.config or your proxy.

Next steps

Quickstart

Start from Forward or add Weaverse to an existing Next app.

Rendering pages

Load and render Weaverse pages in App Router routes.

Data fetching

Section loaders, caching and design mode.

Studio integration

Connect Studio, revalidate items and declare routes.

Markets & translations

Localized pages and theme copy.

API reference

Everything @weaverse/hydrogen/next exports.
Last modified on November 23, 2026