React Tutorial #11: React Router v7
In the previous tutorial, you learned the Context API. Now let’s add routing — the ability to navigate between pages — with React Router v7. React Router v7: What Changed? React Router v7 was released in November 2024. It merged with Remix — a full-stack React framework. This means React Router v7 has two modes: Library mode — the classic React Router for SPAs (what this article covers) Framework mode — Remix-style file-based routing with server-side features We use library mode in this article since we are building a Vite SPA. We cover Next.js (a separate framework with its own routing) starting from React Tutorial #19. ...