I have typescript error with Switch and Route from react-router-dom and I don't know why they appear. Probably it's because of libraries versions incompatibility, but I did't find information about it.
Libraries versions:
- react: 17.0.1
- @types/react: 17.0.1
- react-router-dom: 5.2.0
- @types/react-router-dom: 5.3.1
- typescript: 4.5.5
UPD. I updated @types/react-dom library, because it has old version and added @types/react-router library and types errors disappeared.