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

React 18 support #1485

Open
jkytomak opened this issue Nov 14, 2023 · 4 comments
Open

React 18 support #1485

jkytomak opened this issue Nov 14, 2023 · 4 comments

Comments

@jkytomak
Copy link

jkytomak commented Nov 14, 2023

When trying to update to React 18 I get this kind of errors of all react-vis components:

error TS2786: 'FlexibleWidthXYPlot' cannot be used as a JSX component.
  Its type 'typeof FlexibleWidthXYPlot' is not a valid JSX element type.

Note:
React-vis with React 17 works with fine even with newest ("17.0.80") "@types/react", if you don't get different versions of React by some other dependency.
We needed to add this manual (yarn) resolve:

  "resolutions": {
    "@types/react": "17.0.80"
  }
@collink
Copy link

collink commented Jan 17, 2024

I'm not even able to install react-vis in a fresh React 18 project.

@thisis-Shitanshu
Copy link

thisis-Shitanshu commented Jan 28, 2024

@collink Are you encountering an error indicating a peer dependency version conflict? The package react-vis requires a React version from 15.0.0 to 16.x, which is incompatible with the React version 18.0.0 installed in your project.

image

To work around this, try running the command npm install [email protected] --legacy-peer-deps. The --legacy-peer-deps flag allows you to bypass peer dependency conflicts.

image

I suggest using [email protected] since the latest version has some issues with component rendering (#1482). I'll investigate this further. Meanwhile, this should help!

@dancespiele
Copy link

I have the same issue with RadialChart 'RadialChart' cannot be used as a JSX component. even with version 1.11.12 installed with yarn. Then sad but practically I have to find another alternative that at least works

@jkytomak
Copy link
Author

jkytomak commented Sep 9, 2024

First step would be merging this PR:
#1473

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

4 participants