When using:
<Route path={rootPath} exact render={props => <LoginLayout {...props} />} />
in typescript LoginLayout when prompts an error:
Type '{ history: History<PoorMansUnknown>; location: Location<PoorMansUnknown>; match: match<any>; staticContext?: StaticContext | undefined; }' has no properties in common with type 'IntrinsicAttributes & { children?: ReactNode; }'.ts(2559)
I tried to add:
const LoginLayout:FunctionComponent = (props: any) => { ... };
<Route path={rootPath} exact render={(props: any) => <LoginLayout {...props} />} />
But it doesn't work. I also tried:
const LoginLayout:FunctionComponent = (props: RouteComponentProps) => { ... };
<Route path={rootPath} exact render={(props: RouteComponentProps) => <LoginLayout {...props} />} />
And it doesn't work...