Skip to content

Preact / Deno Fresh support #8

@NuroDev

Description

@NuroDev

Testing out implementing this project into my own project using Deno Fresh & Preact & getting the following error due to the type mismatch between React & Preact components:

Argument of type 'Element' is not assignable to parameter of type 'ReactElement<any, string | JSXElementConstructor<any>>'.
  Types of property 'type' are incompatible.
    Type 'string | ComponentType<any>' is not assignable to type 'string | JSXElementConstructor<any>'.
      Type 'ComponentClass<any, {}>' is not assignable to type 'string | JSXElementConstructor<any>'.
        Type 'ComponentClass<any, {}>' is not assignable to type 'new (props: any) => Component<any, any, any>'.
          Property 'refs' is missing in type 'Component<any, {}>' but required in type 'Component<any, any, any>'.deno-ts(2345)

I am assuming this is a bug. I could of course probably just add react as an import & cast the type passed in but wanted to report it to see if this something we could possibly improve natively in the module so type casting is not needed.

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