Skip to content

Not working with Preact #54

@mrbrianevans

Description

@mrbrianevans

I am trying to use this in a Preact app, but can't get it to work.

TypeError: createRef is not a function

I have compat aliases set up in snowpack config:

alias: {
    react: 'preact/compat',
    'react-dom': 'preact/compat',
  }

and typescript paths in tsconfig.json:

"paths": {
      "react": ["node_modules/preact/compat/"],
      "react-dom": ["node_modules/preact/compat/"]
    }

I created the factory as recommended in the docs, but still get the above mentioned error.

Has anyone else successfully used react-hint with the latest version of preact? (v10.5.14 at time of writing).

Any ideas what I could do?

Many thanks,
Brian

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