Exploring React Router v7

Friday, December 19, 2025

Coming from React Router v6, the new version brings a lot of change. One of them is the various modes that we can use:

  • Framework
  • Data
  • Declarative

From all of them, seems like Framework mode is the recommended and most comprehensive, so I start with that. However, the documentation is a little confusing for me. To start with, the installation instruction begins with a template. In my case, I want to start from scratch and I found it under upgrading: https://reactrouter.com/upgrading/component-routes. It is also to good to check the following page: https://reactrouter.com/how-to/route-module-type-safety.


In my case, I want to use layout and the following page is a great help: https://reactrouter.com/start/framework/routing.


When it finally works, I need to build the app. In my case, I want to use SSG, so I need to disable the SSR (Server Side Rendering) which is covered under: https://reactrouter.com/how-to/spa.