-
Notifications
You must be signed in to change notification settings - Fork 12.8k
React stateless component + children : error Property 'children' is missing in type 'IntrinsicAttributes #8588
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
I also face this problem, but I go around it by making children optional. Not a good solution though. |
I think this issue is similar to #7992 and #6471. We have decided to not make special treatment for EDIT: Talk with @RyanCavanaugh we should fix this behavior and TypeScript compiler should understand |
Nice to see that this is planned for 2.1. It makes working with React really hard currently. |
Does it progress any further? Is it going to be covered by #13618? |
This looks like a duplicate of #13618, we would like to get that addressed in TS 2.3. |
Closing in favor of #13618 |
[x] Many common issues and suggestions are addressed in the FAQ
https://github.com/Microsoft/TypeScript/wiki/FAQ
[x] Search for duplicates before logging new issues
https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue
[x] Questions are best asked and answered at Stack Overflow
http://stackoverflow.com/questions/tagged/typescript
-> asked on S/O here http://stackoverflow.com/questions/37189910/react-stateless-component-children-with-typescript-error-property-children no responses so far.
TypeScript Version:
1.8.2
Code
Expected behavior:
Should compile.
Actual behavior:
Complains that
error TS2324: Property 'children' is missing in type 'IntrinsicAttributes & { data: any; children: any; }'.
Seems it can't see the children being passed in jsx notation.
The text was updated successfully, but these errors were encountered: