React Router
![npm package](https://img.shields.io/npm/v/react-router.svg?style=flat-square)
React Router is a complete routing library for React.
React Router keeps your UI in sync with the URL. It has a simple API with powerful features like lazy code loading, dynamic route matching, and location transition handling built right in. Make the URL your first thought, not an after-thought.
v4 Is Coming
The next version of React Router (v4) is in beta now.
Docs & Help
- Tutorial – do this first!
- Guides and API docs (v2, v3)
- Troubleshooting guide
- Changelog
- Stack Overflow
- CodePen boilerplate for bug reports
Older Versions:
- 0.13.x - docs / guides / code / upgrade guide
- 1.0.x - docs / code / upgrade guide
For questions and support, please visit our channel on Reactiflux or Stack Overflow.
Browser Support
We support all browsers and environments where React runs.
Installation
Using npm:
$ npm install --save react-router
Then with a module bundler like webpack that supports either CommonJS or ES2015 modules, use as you would anything else:
|
|
The UMD build is also available on unpkg:
|
|
You can find the library on window.ReactRouter
.
What’s it look like?
|
|
See more in the Introduction, Guides, and Examples.
Versioning and Stability
We want React Router to be a stable dependency that’s easy to keep current. We take the same approach to versioning as React.js itself: React Versioning Scheme.
Thanks
Thanks to our sponsors for supporting the development of
React Router.
React Router was initially inspired by Ember’s fantastic router. Many thanks to the Ember team.
Also, thanks to BrowserStack for providing the infrastructure that allows us to run our build in real browsers.