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

@types/react and @types/react-dom dependencies moved from dev to prod and are forcing usage of react v18 #2368

Closed
barneaoren opened this issue Aug 16, 2022 · 2 comments

Comments

@barneaoren
Copy link

Describe the Bug

Starting latest version, the devDependencies of @types/react and @types/react-dom were relocated to the dependencies section, forcing the installation of React v18 types which are breaking any v16 application.

This is a breaking change and should be (1) reverted and (2) pushed to the next major release of React Flow.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Install latest version of React Flow with a React v16 application.

Expected behavior

One of the many issues we are facing is:

TS2786: 'Component' cannot be used as a JSX component.
Its element type 'ReactElement<any, any> | Component<T, any, any> | null' is not a valid JSX element.
Type 'Component<T, any, any>' is not assignable to type 'Element | ElementClass | null'.
Type 'Component<T, any, any>' is not assignable to type 'ElementClass'.
The types returned by 'render()' are incompatible between these types.

Screenshots or Videos

No response

Platform

  • OS: Any
  • Browser: N/A
  • Version: Latest

Additional context

No response

@moklick
Copy link
Member

moklick commented Aug 16, 2022

This slipped through. Thanks for bringing it up so quickly. Fix is released in v10.3.16

@barneaoren
Copy link
Author

Thank you @moklick for fixing it promptly !
I already tested the new version and it seems to be working as expected

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

2 participants