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

#145: Change JSX.Element to React.ReactNode in typings #169

Merged

Conversation

DigitalFlow
Copy link
Contributor

Hi @jakezatecky,

With advanced usage of your lib regarding icons, I also stumbled upon the issue in #145.

TypeScript understands JSX.Element when writing the components directly in line, but React.ReactNode seems to be the far more general approach, which allows for all possible components to be passed as argument, whereas JSX.Element is only objects that are returned from React.createElement.

Source: typescript-cheatsheets/react#57 (comment)

It would be great to have this PR included in the next release to fix these issues for TypeScript users.

Kind Regards,
Florian

@jakezatecky jakezatecky merged commit 67eb973 into jakezatecky:master Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants