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

Bump all React 17 deps to 18 #2008

Closed
wants to merge 1 commit into from
Closed

Conversation

benrhere
Copy link

This is a pretty simple PR which bumps all react 17 dependencies to 18. I'm not sure about other steps that are required for achieving React 18 support, or sure about testing these changes, but hopefully this is a step in the right direction.

@@ -83,8 +83,8 @@
"resolutions": {
"@types/react": "^17.0.11",
"@types/eslint": "7.29.0",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "18.0.0",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have a ^ in front of it? (ditto next line)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely please. This shouldn't be a question, but rather a statement.

@@ -48,8 +48,8 @@
"gatsby-source-filesystem": "^4.4.0",
"gatsby-transformer-sharp": "^4.4.0",
"prism-react-renderer": "^1.2.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react": "18.0.0",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: Does this need ^ ?

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3323c23:

Sandbox Source
nivo Configuration

@benrhere
Copy link
Author

benrhere commented May 18, 2022

It appears there may be some more work to do here. When running npm update, I get:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: nivo@undefined
npm ERR! Found: react@18.1.0
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @storybook/addons@6.4.22
npm ERR! node_modules/@storybook/addons
npm ERR!   @storybook/addons@"^6.4.9" from the root project
npm ERR!   peer @storybook/addons@"^6.4.0" from @storybook/addon-knobs@6.4.0
npm ERR!   node_modules/@storybook/addon-knobs
npm ERR!     @storybook/addon-knobs@"^6.4.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

There seems to be a problem with @storybook/addon-knobs, which doesn't support react 18. But that package actually appears to have been deprecated: storybookjs/storybook#15060

@plouc
Copy link
Owner

plouc commented May 18, 2022

@benrhere, yes, I'm afraid there's more work to do before being able to switch to React 18, also migrating everything to react-spring and removing recompose for good.

@tkonopka
Copy link
Contributor

Among the blocking factors, the storybook examples will need updating as @benrhere suggests to avoid deprectated addons. The work is voluminous because most nivo packages use them, but it could be done.

How about creating an issue listing the affected storybook files, and inviting contributions? Volunteers could update and test individual packages (I can help too). And then this PR could at least update the storybook dependencies. @plouc what do you think?

@stale stale bot added the stale label Sep 8, 2022
Repository owner deleted a comment from stale bot Sep 8, 2022
@plouc plouc added pinned and removed stale labels Sep 8, 2022
@zzzbra
Copy link

zzzbra commented Sep 19, 2022

Is this still the primary PR for getting the React 18 deps into Nivo? Did anyone create an issue listing the affected Storybook examples? I would be happy to help with this.

@shehi
Copy link

shehi commented Jan 2, 2023

This ticket needs more love, as we have entered 2023 now. Happy New Year btw!

@hunt3r
Copy link

hunt3r commented Jan 26, 2023

Being pinned to react 17 is causing some issues for my project as mantine 5.x and remix 1.11.x are moving onto 18 and some plugins for Mantine 5.x I need are on 18. Nivo is a backbone of my solution as well, I'd love to have this on 18 too. Is anyone actively pursuing this at this point?

@plouc
Copy link
Owner

plouc commented Apr 30, 2023

It is now possible to use React 18, and it's now the default for the project (see #2313).

Please note that there are still some issues to be addressed to get rid of the warnings, removing react-motion and recompose mostly, and also migrate the tests to RTL or react-test-renderer as enzyme does not support React 18.

@plouc plouc closed this Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants