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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

@clayui/modal is breaking the build process (Typescript) in React 18 #4843

Closed
kevenleone opened this issue May 4, 2022 · 1 comment 路 Fixed by #4844
Closed

@clayui/modal is breaking the build process (Typescript) in React 18 #4843

kevenleone opened this issue May 4, 2022 · 1 comment 路 Fixed by #4844
Labels
comp: clay-components Issues related to Clay components. (e.g ClayCard, ClayLabel...) type: bug Issues reporting that Component is not doing what should be done

Comments

@kevenleone
Copy link
Member

Hello there 馃憢馃徎

I recently upgrade all the clay dependencies from Testray 2 React project, which Is using Typescript (CRA Template)

And also upgraded React packages too, including the latest version from React 18.0.1.
After upgrading @types/react and @types/react-dom

I noticed that now, React interface no longer support implicit children parameter

ClayModalProvider is showing this error message:

image

Probably related to: https://solverfox.dev/writing/no-implicit-children/

I could make the error desapear, using children: ReactNode; inside IProps Type

I can send a PR with a suggested change, to facilitate.
Thanks!

Is there an example you can provide via codesandbox.com?

I couldn't replicate the same on CodeSandBox

What are the steps to reproduce?

  • Install the latest version for React, React-Dom
  • import {ClayModalProvider} from '@clayui/modal';
  • Use with a child component

What is the expected result?

Shouldn't throw any error on React with Typescript

Environment

Tech Version
@clayui/modal 3.55.0
react 18.0.1
react-dom 18.0.1
@types/react 18.0.8
@types/react-dom 18.0.3
typescript 4.6.4
@kevenleone kevenleone added the type: bug Issues reporting that Component is not doing what should be done label May 4, 2022
@matuzalemsteles matuzalemsteles added the comp: clay-components Issues related to Clay components. (e.g ClayCard, ClayLabel...) label May 4, 2022
@github-actions
Copy link

github-actions bot commented May 9, 2022

This issue has been merged and will be released in DXP at https://issues.liferay.com/browse/LPS-150212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: clay-components Issues related to Clay components. (e.g ClayCard, ClayLabel...) type: bug Issues reporting that Component is not doing what should be done
Projects
None yet
2 participants