Skip to main content

Picking a Mode

React Router is a multi-strategy router for React. There are three primary ways, or “modes”, to use it in your app. The features available in each mode are additive, so moving from Declarative to Data to Framework simply adds more features at the cost of architectural control.
Pick your mode based on how much control or how much help you want from React Router.

The Three Modes

The mode depends on which “top level” router API you’re using:
Enables basic routing features like matching URLs to components, navigating around the app, and providing active states.

Mode Comparison

Decision Guide

Every mode supports any architecture and deployment target, so the question isn’t really about if you want SSR, SPA, etc. It’s about how much you want to do yourself.

Examples By Mode

Can I Switch Modes Later?

Yes! The modes are designed to be upgrade paths:
Start simple and upgrade as your needs grow. Each mode builds on the previous one.