Type '{}' is missing the following properties from type 'RouteComponentProps<any, StaticContext, unknown>': history, location, matchts(2739) code example

Example 1: Type '{}' is missing the following properties from type 'RouteComponentProps': 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} />

Example 2: Type '{}' is missing the following properties from type 'RouteComponentProps<{}, StaticContext, unknown>': history, location, match

const LandingFrame = (props: RouteComponentProps<{}>) => {
    return (
        <LandingMain {...props} />
    );
}

Tags:

Misc Example