preactjs / wmr

👩‍🚀 The tiny all-in-one development tool for modern web apps.
https://wmr.dev/
MIT License
4.92k stars 109 forks source link

JSX.Element don't have children prop. #921

Closed Aloento closed 2 years ago

Aloento commented 2 years ago

If you use Typescript to try this https://github.com/preactjs/wmr/issues/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

rschristian commented 2 years ago

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.

rschristian commented 2 years ago

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?

Aloento commented 2 years ago

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