-
Notifications
You must be signed in to change notification settings - Fork 12.8k
JSX element type 'Element[]' is not a constructor function for JSX elements #33487
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
Comments
This is the issue of DefinitelyTyped: DefinitelyTyped/DefinitelyTyped#20356 |
If you wrap your mapped list in a fragment its valid.
I had the same error while returning an array of elements. Including |
Thank you! This helped me. |
TypeScript Version: 3.5.1
Search Terms:
JSX element type 'Element[]' is not a constructor function for JSX elements
array jsx elements aren't support
Code
Expected behavior:
Should be no errors. It is valid behavior. Flow support this behavior.
Actual behavior:
Typescript throw error:
Playground Link:
https://www.typescriptlang.org/play/index.html?jsx=2#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQFA24QB2q8AwiZI1o-ALxwAKAJRxeAPjgBtMsBhYQARjIAacrPkAmMgF0AdCGRgBA9SBHi4AHgAmwAG5iA3qYC+lgPS2HQug2ZsmGGRgLihRQXMJS3ZwJm54dzEgA
The text was updated successfully, but these errors were encountered: