Skip to content

'Component' cannot be used as a JSX component #3

@nikolasmish

Description

@nikolasmish

Copying final code gives me following error:

'Component' cannot be used as a JSX component. Its element type 'Component<any, any, any> | ReactElement<any, any> | null' is not a valid JSX element. Type 'Component<any, any, any>' is not assignable to type 'Element | ElementClass | null'. Type 'Component<any, any, any>' is not assignable to type 'ElementClass'. The types returned by 'render()' are incompatible between these types. Type 'ReactNode' is not assignable to type 'false | Element | null'. Type 'undefined' is not assignable to type 'false | Element | null'.ts(2786)

Running on React 17.0.2, tslib 2.3.1, @types/react 17.0.40 and @babel/preset-typescript 7.16.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions