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 19 Support #2618

Open
florence-wolfe opened this issue Jul 1, 2024 · 4 comments
Open

React 19 Support #2618

florence-wolfe opened this issue Jul 1, 2024 · 4 comments

Comments

@florence-wolfe
Copy link

Is your feature request related to a problem? Please describe.

  • @nivo/core (and possibly other packages) have a strict React dependency range that restricts React 19
  • This prevents applications from upgrading their React versions unless they begin including the --legacy-peer-deps flag or --force for every installation which is not ideal.

Describe the solution you'd like

  • Either increase the allowing version range in the packages or add proper support for the version.
    • The React team has written a migration guide that also includes several codemods to make the migration relatively seamless.
@plouc
Copy link
Owner

plouc commented Jul 2, 2024

Adding support for React 19 might be a lot of work, it's also still unclear, looking at the migration guide, if I could still support older React versions with the same @nivo version.

The 19 still being a RC at the moment, I think it's not really pressing, and I'd probably need to upgrade gatsby, storybook... as well, which seems like a huge project.

Finally, I was migrating tests from enzyme (which has been deprecated) to use the react test renderer, which they're removing apparently, they advise to use @testing-library/react, but the approach of this lib is really not practical to test charts/svg elements.

It will take time to get there and this should be split in sub-projects, I don't have the bandwidth to handle everything at once.

@J4v4Scr1pt
Copy link

J4v4Scr1pt commented Jul 3, 2024

Will follow this thread, we are a company that are about to replace our current chart solution.
This was our top pick until I saw this thread.

I understand that time estimation is super hard, but do you think this will take years or months after React 19 release?
Because we (among others) use Next.Js and no React 19 support will also block us from upgrading nextjs version in the future.

@o-alexandrov
Copy link

o-alexandrov commented Jul 8, 2024

React has an issue where they link some libraries and respective PRs how those libraries upgraded to react 19.
It might be a useful read to familiarize with common roadblocks and how other devs resolved those in their projects.

imho, the starting point would be to run various provided by React 19 codemods which should do the heavy lifting:

npx codemod@latest react/19/migration-recipe

@plouc
Copy link
Owner

plouc commented Jul 9, 2024

@o-alexandrov, thank you for sharing, this could help.

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