This library is a type-safe verion of the DOM bindings for React Router.
It is intended to be used with TypeScript.
Using npm:
$ npm install --save typed-react-router-dom react-router-dom
Then with a module bundler like webpack, use as you would anything else:
import { TypedReactRouter } from 'typed-react-router-dom';
interface IAppRoutes {
'/login/:name': { name: string }
'/': {}
}
const { BrowserRouter, Route, Link } = new TypedReactRouter<IAppRoutes>();