Skip to content

chore: sync react router template with example - #3929

Draft
fredericoo wants to merge 30 commits into
previewfrom
fb-react-router-template-refresh-preview
Draft

chore: sync react router template with example#3929
fredericoo wants to merge 30 commits into
previewfrom
fb-react-router-template-refresh-preview

Conversation

@fredericoo

@fredericoo fredericoo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

TL;DR: Refreshes the standalone React Router template from the current example and keeps it deployable to Oxygen without monorepo dependencies.

Before

templates/react-router had drifted from examples/react-router and was missing newer storefront routes, cart behaviour, predictive search, Customer Accounts, and SEO resource routes.

After

The template now uses the current React Router example as its source, with an Oxygen Worker runtime. The source template stays on the workspace (workspace:*, pnpm, no lockfile); the release flow pins the @shopify/hydrogen preview version and generates an npm lockfile in the distributed copy only.

What this changes

  • Refreshes the storefront UI and routes from examples/react-router.
  • Adds Customer Accounts, predictive search, sitemap, and robots routes.
  • Replaces workspace/shared imports with template-local modules.
  • Uses Mini Oxygen with Worker env, cache, and waitUntil context.
  • Updates the template README and the example-to-template conversion guidance.

Developer impact

No changeset. This updates a standalone preview template and repo-local conversion documentation; it does not change a published package API.

UX impact

The template gains the newer product, collection, search, cart, account, consent, and accessibility behaviour from the React Router example.

Risk

  • Oxygen runtime wiring, Customer Account session handling, and cart flows deserve focused review.
  • Customer Accounts require a real store, HTTPS, and the documented environment values.

How to Test

  1. Run pnpm install from the repository root.
  2. Run pnpm dev in templates/react-router with no .env file and open http://localhost:5173.
  3. Confirm the home, collections, search, cart, robots, and sitemap routes render against mock.shop.
  4. Run pnpm preview in templates/react-router and confirm the same routes render through the built Mini Oxygen Worker.
  5. Optionally configure the real-store and Customer Account environment values from .env.example, deploy to Oxygen, and verify account login/logout.

@fredericoo fredericoo changed the title Refresh React Router Oxygen template chore: sync react router template with example Aug 6, 2026
@fredericoo fredericoo self-assigned this Aug 6, 2026
@fredericoo
fredericoo force-pushed the fb-react-router-template-refresh-preview branch from 8fb9104 to 1caafdb Compare August 11, 2026 18:08
Assisted-By: devx/bf421943-f843-4961-b8a8-dda9832dc219
Assisted-By: devx/824b8448-3a43-40c7-95aa-03e53d4e9683
Assisted-By: devx/824b8448-3a43-40c7-95aa-03e53d4e9683
@fredericoo
fredericoo force-pushed the fb-react-router-template-refresh-preview branch from 1caafdb to 66642c1 Compare August 12, 2026 13:20
Assisted-By: devx/824b8448-3a43-40c7-95aa-03e53d4e9683
Assisted-By: devx/824b8448-3a43-40c7-95aa-03e53d4e9683
Assisted-By: devx/824b8448-3a43-40c7-95aa-03e53d4e9683
Comment thread templates/react-router/package.json
Comment thread templates/react-router/package.json Outdated
Comment thread templates/nextjs/components/CollectionBrowser.tsx
Comment thread templates/react-router/react-router.config.ts

@andguy95 andguy95 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review with Freddie

Comment thread templates/react-router/package.json
Comment thread packages/hydrogen/skills/hydrogen-cart-drawer/SKILL.md Outdated
Comment thread packages/hydrogen/skills/hydrogen-cart-drawer/SKILL.md Outdated
Comment thread packages/hydrogen/skills/hydrogen-collection-browser/references/react.md Outdated
Comment thread packages/hydrogen/skills/hydrogen-collection-browser/references/react.md Outdated
Comment thread packages/hydrogen/skills/hydrogen-collection-browser/references/react.md Outdated
Comment thread packages/hydrogen/skills/hydrogen-setup/steps/4-collection-and-search.md Outdated
Comment thread packages/hydrogen/src/core/collection/url.ts Outdated
Comment thread skills/create-oxygen-template/reference/react-router-pattern.md Outdated
Comment thread templates/react-router/app/components/AnalyticsTracker.tsx
Comment thread templates/react-router/app/components/CartLineItem.tsx Outdated
Comment thread templates/react-router/app/components/CartLineItem.tsx Outdated
Comment thread templates/react-router/app/components/ConsentBanner.tsx Outdated
Comment thread templates/react-router/app/components/Footer.tsx Outdated
Comment thread templates/react-router/app/routes/home.tsx Outdated
Comment thread templates/react-router/app/routes/home.tsx Outdated
Comment thread templates/react-router/app/routes/home.tsx
Comment thread templates/react-router/app/routes/home.tsx Outdated
Comment thread templates/react-router/app/root.tsx Outdated
Comment thread templates/react-router/app/root.tsx Outdated
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
# Conflicts:
#	templates/react-router/app/lib/shop.ts
#	templates/react-router/app/root.tsx
#	templates/react-router/app/tokens.css
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Assisted-By: devx/899d707e-e729-46de-a04c-49ad1774ca15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants