You might not need React Router
Konstantin Tarkus
63530

In answer to your question about why someone would want to use JSX for defining routes:

  • It may be helpful to consider routes to be part of the user interface, even though they are not in the DOM—the user sees and interacts with them.
  • JSX is useful for readable nested routes. Nested routes are slightly more awkward using the methods you describe in the article. It’s nice to use the same abstraction for nesting for both routes and typical UI components.

That said, I share some of your sentiments about React Router. I’ve found it to be an occasionally-leaky abstraction and have spent a lot of time digging through the docs and source code to solve seemingly-trivial problems. I’m not sure how much of this is incidental vs. essential complexity.

A single golf clap? Or a long standing ovation?

By clapping more or less, you can signal to us which stories really stand out.