Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the Shopify Remix template to React Router v7 by replacing Remix-specific adapters, APIs, and configurations with React Router equivalents and updating the build toolchain to Vite.
- Switch server/client routing from Remix to React Router (imports, adapters,
<ServerRouter>, loader/action returns) - Update package.json scripts, dependencies (Vite build,
type: "module", engines, React Router packages) - Adjust route components, CSS handling, and error boundary to align with React Router conventions
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| react-router.config.ts | Added React Router dev server configuration |
| package.json | Updated scripts, added ESM, Vite build, React Router deps |
| app/shopify.server.js | Switched to React Router–compatible Shopify server adapter |
| app/routes/**/*.jsx | Replaced @remix-run/* imports with react-router, plain returns |
| app/routes/app._index.jsx | Import/update loader return, added headers export via boundary |
| app/routes/_index/route.jsx | Removed Remix links, updated redirect/form imports |
| app/routes.js | Introduced flatRoutes entry |
| app/root.jsx | Switched root imports to React Router, added lang="en" |
| app/entry.server.jsx | Replaced <RemixServer> with <ServerRouter>, updated timeout |
| .graphqlrc.js | Updated LATEST_API_VERSION import path |
Comments suppressed due to low confidence (3)
app/routes/app._index.jsx:6
- You removed the
links()export that injects the stylesheet; importing the URL alone won’t include it in the page. Consider re-adding alinks()function that returns{ rel: 'stylesheet', href: styles }.
import "./styles.css?url";
app/routes/qrcodes.$id.jsx:2
- The loader now returns a plain object instead of
json. Add or update tests to verify thatuseLoaderDatacorrectly receivestitleandimageproperties under React Router.
import { useLoaderData } from "react-router";
app/routes/_index/route.jsx:6
- The CSS import needs a corresponding
links()export for React Router to add a<link>tag. Without it, your styles won’t load in the browser.
import "./styles.css?url";
c1ca960 to
80d72b2
Compare
lizkenyon
approved these changes
Jun 26, 2025
925968d to
35b47ba
Compare
d0cd359 to
cdfe73e
Compare
7d1f914 to
3abf441
Compare
…ependency, then expressing the predev command in the sopify.web.toml
…main/start/future-flags#v3_singlefetch Adopting this flag requires: 1. Adding everywhere that calls authenticate.admin(). In the template, there is just one place where this is missing, which is why I added it to app._index.tsx 2. Adding declare module @remix-run/node to the vite.config.ts file 3. Removing json() from every loader/action that uses it
…ativeSplatPath and v3_fetcherPersist
…shopify-app-react-router is simpler
3abf441 to
6a5a658
Compare
…or creating, editing & deleting QR codes.
7e05b88 to
bead872
Compare
Fix issue where QR Code could not be saved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How to use this PR
This PR shows how to upgrade an out of date version of the Shopify Remix app template to React Router that has not yet adopted Vite. It breaks changes into logical commits that follow the migrations guides:
If you want to understand each change, you can follow the commits in order. Alternatively, you can look at all the changes as one and copy them across to your app.
Most likely you won't need all the changes in this PR. The QR Code example hasn't kept up to date with the latest versions of
@shopify/shopify-app-remixand you probably created your app after we created this one.DO NOT MERGE
Keeping this open as a demonstration of upgrading an app from Remix to React Router