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
1.0M
Open issues
179
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
- 1.0M 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
- 179 open issues on GitHub