React Router

Routing library for Lore


Lore uses React Router as the default routing library.

Where does React Router show up in Lore?

While Lore includes react-router by default, new projects are only lightly coupled to it. The places it shows up are:

  • In the routes.js file at the root of the project
  • In the lore-hook-router hook that configures react-router
  • In the lore-hook-react hook that wraps the application with Router

If you wanted to replace React Router with a different routing solution you could, though Lore itself will continue using it as the default for the forseeable future.

Resources for Learning React Router

You can learn more about React Router through the official documentation and examples.

It's important to mention though that new Lore projects include react-router v3, and NOT v4. The links above go to the v3 documentation.

By modifying some of configuration files in your project, it's possible to replace v3 with v4, but there's no formal guide explaining how to do it yet. Once there is, a link will be provided here.

If you're interested in learning more about v4, you can explore it on the new react-router website.