benawad / benawad/react-router-example
RouteComponentProps workaround
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
love your series dude
over 80k subscribers already? fame is good and bad eh, hope it'll give you a lot of energy and motivation. You are btw the only one I am watching where I dont have the feeling you are trying to sell me onto something. With other youtubers, you always feel like they skipping their real opinion to get you buy something.
https://github.com/benawad/react-router-example/blob/c9736a444ea1f4ebb1b9dc8e6991d5ff106ff064/src/Post.tsx#L4
referencing issue here:
https://stackoverflow.com/questions/48138111/what-typescript-type-should-i-use-to-reference-the-match-object-in-my-props
my poor mans workaround is just doing this:
```
interface Props {
match?: {params: {id: string}}
}
```
btw another good addition to the example would have been this:
```
{
return
}}/>
```
e.g. the ability to add props to a component of the router
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.