preactjs/wmr

JSX.Element don't have children prop.

Aloento opened this issue · 3 comments

If you use Typescript to try this #919
Then you will find your JSX.Element (VNode<any>) from wmr didn't have the children property.

It's a very annoying error.
image

It doesn't look like this is related to WMR.

Preact and React aren't fully compatible when it comes to types, and it looks like you're using something that was meant for React.

Interestingly I get a different error in my editor when looking at this:

[tsserver 2786] [E] 'HelmetProvider' cannot be used as a JSX component.
  Its instance type 'HelmetProvider' is not a valid JSX element.
    Type 'HelmetProvider' is missing the following properties from type 'Component<any, any>': state, props, context, setState, and 2 more.

Do you have any TSConfig alterations made?

No, TSConfig is the original version.
I prepare this for you
https://github.com/Aloento/WMR