React Router

⚠️

While it's possible to use Vike with React Router we recommend against it: Vike's built-in router has many features that React Router doesn't (and cannot) offer.

That said, if you have an existing app using React Router that you want to migrate to Vike, then it can makes sense to start using Vike with React Router. After your migration is done you can later/progressively migrate from React Router to Vike's built-in router.

Vike's router aims to be as feature-rich as React Router: if you need a React Router feature that is missing then create a new feature request.

We believe routing should be completely owned by the frontend framework. Trying to separate concerns in that regard leads to inherent DX degradations.

Example of using Vike with React Router (shallow integration without using onBeforeRoute()):

Contributions welcome to explore deep integration using onBeforeRoute().