What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-01 04:18:02
Type '{}' is missing the following properties from type 'RouteComponentProps<any, StaticContext, unknown>': history, location, matchts(2739)
Child component doesn't have router props typescript Two ways to fix this 1. use withRouter(ChildComponent); 2. pass parentProps to Child e.g. <Child {...props} /> Add solution