You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, this gives the following error in typescript.
Argument of type '{ createElement: typeof h; Component: typeof Component; createRef: <T = any>() => RefObject<T>; }' is not assignable to parameter of type 'typeof React'.
Type '{ createElement: typeof h; Component: typeof Component; createRef: <T = any>() => RefObject<T>; }' is missing the following properties from type 'typeof React': createPortal, render, hydrate, unmountComponentAtNode, and 33 more.ts(2345)
A workaround is to use the following type cast, although it is pretty ugly.
I am trying to use this in a Preact app, but can't get it to work.
I have compat aliases set up in snowpack config:
and typescript paths in tsconfig.json:
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
The text was updated successfully, but these errors were encountered: