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

Dealing with the "Property 'children' does not exist on type" error when upgrading to React 18 #21

Closed
narender56 opened this issue Apr 29, 2023 · 1 comment

Comments

@narender56
Copy link
Contributor

It seems that updating the React version to 18 is leading to some typescript errors in the code. Specifically, it is now necessary to define the "children" property on components, which was not required before.

React version 18 likely includes changes or updates to the way the library handles TypeScript, resulting in a stricter set of requirements for component definition. To prevent errors and ensure the code functions properly, developers must now explicitly define the "children" property on components, which represents the content nested within the component element.

Failing to define "children" in components can lead to TypeScript errors, as the compiler will flag any attempts to use or modify the property. Therefore, it is essential for developers to adjust their code to account for this change when upgrading to React version 18.

image

@narender56
Copy link
Contributor Author

Fixed in #22

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

No branches or pull requests

1 participant