Skip to content
Home / Migrations / Remix v2React Router v7

Remix v2 React Router v7

easy

React Router v7 IS Remix v3. The Remix team merged into React Router. Migration is mostly a package rename with a codemod that handles 90% of changes.

Estimated: 1-3h · 5 steps
Progress0%
Step 1: Run the codemod
npx codemod react-router/v7
Step 2: Update package.json

Replace @remix-run/react, @remix-run/node, @remix-run/serve with react-router and @react-router/node, @react-router/serve.

npm uninstall @remix-run/react @remix-run/node && npm install react-router @react-router/node
Step 3: Update imports

All @remix-run/react imports → react-router. @remix-run/node imports → @react-router/node. The codemod handles most of these.

Step 4: Update vite.config.ts

Replace @remix-run/dev/vite with @react-router/dev/vite.

import { reactRouter } from '@react-router/dev/vite'
Step 5: Verify routes

Route config in routes.ts is unchanged. File-based routing with routes/ directory works identically.

Dev server starts, routes render, loaders/actions work

What this migration involves

Moving from Remix v2 to React Router v7 is rated easy and takes about 1-3h on a typical project. The guide breaks it into 5 steps, 3 of which ship with runnable commands and 1 with a verification check.

FAQ

How long does migrating from Remix v2 to React Router v7 take?

Around 1-3h for a typical project — 5 steps, difficulty rated easy, 3 of them with copy-paste commands.

Is moving from Remix v2 to React Router v7 reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Remix v2 data before you start.

What does React Router v7 cost compared to Remix v2?

Pricing for both tools is contact-based or not tracked yet.