<Router>
{/* Type 'typeof ClassComponent' is not assignable to type 'AnyComponent<{ path: string; component: typeof ClassComponent; }> & (typeof ClassComponent | undefined)'. */}
<Route path="/class" component={ClassComponent} />
{/* works ok */}
<Route path="/fc" component={FunctionComponent} />
</Router>
It works at runtime, but the typing has an error.