Some samples of integrating TypeScript with react-router 4.x.
react-router
The goal is to preserve as much type safety as possible.
How to accomplish this with TypeScript is not obvious when following the projects documentation.