Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Declarative routing for React

Subscribe to updates I use react-router

Statistics on react-router

Number of watchers on Github 28879
Number of open issues 45
Average time to close an issue about 9 hours
Main language JavaScript
Average time to merge a PR 1 day
Open pull requests 63+
Closed pull requests 117+
Last commit over 1 year ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 8.13 MB
Homepage https://reacttrai...
Organization / Authorreacttraining
Latest Releasev3.2.1
Page Updated
Do you use react-router? Leave a review!
View open issues (45)
View react-router activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating react-router for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


React Router

Declarative routing for React


View the docs here

Migrating from 2.x/3.x?

3.x docs

2.x docs


This repository is a monorepo that we manage using Lerna. That means that we actually publish several packages to npm from the same codebase, including:

Package Version Docs Description
react-router npm The core of React Router
react-router-dom npm DOM bindings for React Router
react-router-native npm React Native bindings for React Router
react-router-redux npm Integration with React Router and Redux
react-router-config npm Static route config helpers


react-router is developed and maintained by React Training and many amazing contributors. If you're interested in learning more about what React can do for your company, please get in touch!

react-router open issues Ask a question     (View All Issues)
  • almost 3 years No imperative router API documentation.
  • almost 3 years Parameter lost after navigating with React-router on Multilingual app
  • almost 3 years Navigate programmatically in v3.0 / no upgrade notes/details?
  • almost 3 years upgrade-guides about v3.0
  • almost 3 years best way to call async method before transition
  • almost 3 years Document `routes` injected prop
  • almost 3 years Declaring React-Router V4 routes within the render() of a Redux Container doesn't work
  • almost 3 years Trailing slash + `exactly` in v4
  • almost 3 years Empty relative path does not match index
  • almost 3 years When can't MatchGroup be used for misses?
  • almost 3 years Documentation for router and history Context usage.
  • almost 3 years Emphasize routers can only have one child
  • almost 3 years Problem with similarly named routes
  • almost 3 years Handle encoded URLs on initial load
  • almost 3 years Miss will always render null before rendering its component in BrowserRouter
  • almost 3 years Issue with <Miss /> and SCu interference
  • almost 3 years Missing "children" prop feature in <Miss>
  • almost 3 years Scroll management
  • almost 3 years More accessible docs, hosted on GH pages
react-router open pull requests (View All Pulls)
  • Allow <Link> to be used outside of Router, add warning
  • add module entry point for webpack v2 #3788
  • Discard optional paren history based on params evaluation
  • add reference to react-router-scroll to the docs
  • Failing test for Miss passing unexpected location
  • Add children prop feature in <Miss>
  • fix(Link): More strict matching
  • [WIP] Use relative paths in Links
  • matchPattern tests
  • preserve location.key only if it was present in the original input object
  • go back to using is-equal again
  • Coerce query params to string - alternate solution
  • Coerce query params to string
  • Failing test for <Miss /> with 'Blocker' component
  • [WIP] withRouter higher order component
  • [DO NOT MERGE] Add test for transition to with basename
  • Adds action to Match component props
  • Add shared history example
  • Adding support for escaped parentheses in Route Paths
  • v4 Context API Docs
  • decodeURI on pathname
  • Issue #5114 warn about history prop in Router-derived components
  • NavLink should render child components wrapped by withRouter #5141
  • react-router-config - renderRoutes(routes, otherProps = {})
  • Use direct import to react-router.
  • Generic back button
  • Add query string parsing guide
  • update readme to clarify pathname
  • add externals config for prop-types?
  • [Website] Add documentation title header
  • Use jest-matchers for assertions instead of expect
  • Update docs sample code to avoid side effects in render()
  • Explicit error on <Route> outside <Router>
  • Add a basic components guide
  • react-router-native/Link improvements
  • Add history to the repo
  • Make react-router-redux work with time travelling
  • aria-current in NavLink #4707
  • Fix pathless route's match when parent is null
  • Support relative <Route>
  • Relative <Link> and <Redirect> using resolveLocation
  • Prompt beforeUnload (#4272)
  • [WIP] Use new Context API in React 16.3
  • Allow to pass render prop in config
  • Support fragments in <Switch />
  • add support for an array of paths in <Route> and matchPath
  • Allow customising the render of a Switch component
  • Use history.createLocation in <StaticRouter>
  • Added server-side rendering example to new React Router Redux package
  • Remove single child restriction for <Router>
  • Deprecate <Route exact>
  • Wrap examples in create-react-app apps
  • Switch: wrap matched route with `render` or `component` passed to `Switch` if any
  • Use Jest projects for testing
  • matchPath failing at unicode paths
  • Make Link and NavLink components accept "to" property as a function
  • Adds failing test cases for Issue 5296
  • Link - Prevent default href behaviour even if onClick has an error (avoid weird SPA errors)
  • (Don't Merge) Expect ReactRouterDOM as global in react-router-config UMD
  • Do not include trailing `/` in url if it's not included in path
  • Note on accessing location.state in Redirect docs
  • StaticRouter: retain location.state [WiP]
  • Fix history api changes in react-router-redux
react-router questions on Stackoverflow (View All Questions)
  • CSS and JavaScript breaking with onEnter with react-router
  • React Router in meteor.startup.js (meteor top-level)
  • React Router onEnter Error
  • React-router New page renders and previous component stays on page after doing browserhistory.push('/path')
  • Is there a way to change react Router on store change?
  • React Router server side rendering with Helmet?
  • React-router urls don't work when refreshing or writting manually
  • What is the use of State key in react-router Link?
  • NavigationExperimental or React Router for fully functional application with Redux?
  • How can I solve the error "[react-router] Location "/" did not match any routes" in react?
  • Pass this.props.children to another file in react-router
  • React-router not able to load nested pages
  • ReactJS: How to configure browserHistory of react-router on glassfish server
  • React Router v4 with babel gives error with multiple routes
  • Accessing a url parameter to use in a query using react-router-relay
  • Advice on relative urls for React Router and static content
  • React router + redux navigating back doesn't call componentWillMount
  • how to access store in actions to dispatch push in react-router-redux?
  • react-router-redux webpack dev server historyApiFallback fails
  • Make react-hot-loader work with react-router?
  • Google recaptcha hides after changing component via react-router
  • Pass props created in app.jsx level through react router
  • ReactJS react-router RoutingContext
  • react-router - pass props to handler component
  • Programmatically navigate using react router
  • How to fetch and display item by id using Relay container, react-router and GraphQL
  • React router not redirecting on server
  • react router server side rendering: How to get route params on server side?
  • How to use React Router on top of Rails router (not using react-rails gem)?
  • React-Router Tabs component mounting before data is fetched
react-router list of languages used
react-router latest release notes
v3.2.1 v3.2.1


  • React 16.3 support
v3.2.0 v3.2.0


  • React 16 support
v4.2.2 react-router-dom v4.2.2

Apologies for the quick rebuild. There was a bad UMD config, which would have required you to include both the react-router and react-router-dom UMD files. You should only have to include react-router-dom now, which is the same behavior as the npm package.

OK, I'm done for a bit...

Other projects in JavaScript