Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Aloento opened this issue Apr 12, 2022 · 3 comments
Closed

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

Aloento opened this issue Apr 12, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Aloento
Copy link

Aloento commented Apr 12, 2022

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

@Aloento Aloento added the bug Something isn't working label Apr 12, 2022
@rschristian
Copy link
Member

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.

@Aloento Aloento closed this as completed Apr 12, 2022
@rschristian
Copy link
Member

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
Copy link
Author

Aloento commented Apr 12, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants