Previous versions of @radix-ui/react-portal
@radix-ui/react-tooltip
declared a peerDep for "react" as follow:
"peerDependencies": {
"react": "^16.8 || ^17.0",
"react-dom": "^16.8 || ^17.0"
},
cf. https://github.com/radix-ui/primitives/blob/4896ca04f425d443e9ac08614bffcf02532e7df1/packages/react/portal/package.json#L25
causing many warnings in React 18 projects:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @radix-ui/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN react@"^18.2.0" from the root project
npm WARN 24 more (@emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8 || ^17.0" from @radix-ui/[email protected]
npm WARN node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-compose-refs
npm WARN @radix-ui/react-compose-refs@"0.1.0" from @radix-ui/[email protected]
npm WARN node_modules/@radix-ui/react-presence
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN peer react@"^16.8 || ^17.0" from @radix-ui/[email protected]
npm WARN node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-compose-refs
npm WARN @radix-ui/react-compose-refs@"0.1.0" from @radix-ui/[email protected]
npm WARN node_modules/@radix-ui/react-presence
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @radix-ui/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN react@"^18.2.0" from the root project
npm WARN 24 more (@emotion/react, @emotion/styled, ...)
...
In most recent versions of @radix-ui/react-portal
@radix-ui/react-tooltip
peerDeps were updated to:
"peerDependencies": {
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
cf. https://github.com/radix-ui/primitives/blob/f0a7495bcd00faa14164b2f80721149238c85d9d/packages/react/portal/package.json#L24
So I have upgraded those 2 packages to their latest version:
$ yarn workspace leva add @radix-ui/react-portal @radix-ui/react-tooltip
Despite of the MAJOR bump, there was no breaking change from what I've seen.cf. the comment below
I also checked Storybook was ok.
But please make sure everything is fully functional since this is my first PR on this project.