Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
@types/react-router 4.0.31 errors #28894
I tried using the most recent version of @types/react-router (v 4.0.31) and had problems.
history?: string | undefined; match?: string | undefined; location?: string | undefined;
That's what react router produces; just strings.
The motivation behind the PR was a colleague spending an afternoon wondering why when he said a parameter was a
If you debug
You can see an illustration of this. At first glance you'd think the router was returning
The docs could be clearer TBH. In the end parameter matching works based upon a RegEx that produces strings.
Related PR: #28868