npm install @types/react-router-dom does not have Routes supported as far
Those types aren't maintained here. We don't have types for v6 yet.
Sorry to chime in. Is anyone working on types yet or are you waiting for release? I have a good app that sits between medium and large and would love to test this out.
Nevermind. I found the open PR to add @6 - https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44015
Why don't you just add typescript support directly into react-router?
This is such a basic react library and it's a shame that it does not support typescript directly which should be a must have for any good react library.
It would be even better if the implementation itself would have been written in ts, but I guess that's a different matter.
@olee We plan to do so in v6. Michael is working on it.
If any of you could help with my PR to make it pass I would highly appreciate it. Me and 2 other guys did almost everything but due to braking changes I cannot pass the tests and it makes it impossible to quickly enable all TypeScripters to use v6.
Looks like they are putting types right into the project - https://github.com/ReactTraining/react-router/commit/ad470c3efdabdb8a9fe2229a31d3e32e99546d4c
Most helpful comment
@olee We plan to do so in v6. Michael is working on it.