Closed Aloento closed 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.
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
If you use Typescript to try this https://github.com/preactjs/wmr/issues/919 Then you will find your
JSX.Element
(VNode<any>
) fromwmr
didn't have thechildren
property.It's a very annoying error.![image](https://user-images.githubusercontent.com/11802769/163014518-956937ef-9047-44f0-a4f3-6ced9593edea.png)