React Router Config
react-router-config
Static route config matching for React Router
Routing
react
router
route
routing
static routes
route config
react router
react-router-config
javascript
npm
Stars
57k
Weekly
832k
Open issues
239
Bundle
~25 kB
Installation
npm install react-router-configCode example
import { BrowserRouter, Routes, Route, Link } from "react-router-config";
export function Example() {
return (
<BrowserRouter>
<nav>
<Link to="/">Home</Link>
</nav>
<Routes>
<Route path="/" element={<h1>Home</h1>} />
</Routes>
</BrowserRouter>
);
}Pros & cons
Pros
- Actively maintained by timdorr
- 832k weekly downloads. Battle tested
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 239 open issues on GitHub