Skip to content

Router typings incompatible with class components #35

@foxt

Description

@foxt
<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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions