I\'m trying to use react router with TypeScript. However, I have certain problems using withRouter function. On the last line, I\'m getting pretty weird error:
A
It looks like you have the right usage to apply the match, history, and location props to your component. I would check in your node_modules directory to see what versions of react-router and react-router-dom you have, as well as the @types modules.
I have essentially the same code as you, and mine is working with the following versions:
{
"@types/react-router-dom": "^4.0.4",
"react-router-dom": "^4.1.1",
}