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 #2341

Open
1 of 5 tasks
Psli opened this issue Dec 7, 2024 · 28 comments · May be fixed by #2349
Open
1 of 5 tasks

React 19 support #2341

Psli opened this issue Dec 7, 2024 · 28 comments · May be fixed by #2349
Labels
area: core relates to core classes // parts of the library kind: request New feature or request that should be actioned

Comments

@Psli
Copy link

Psli commented Dec 7, 2024

Which react-spring target are you using?

  • @react-spring/web
  • @react-spring/three
  • @react-spring/native
  • @react-spring/konva
  • @react-spring/zdog

What version of react-spring are you using?

9.7.4

What's Wrong?

npm error Could not resolve dependency

To Reproduce

npm i @react-spring/web

Expected Behaviour

(node:26685) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: undefined@undefined
npm error Found: [email protected]
npm error node_modules/react
npm error react@"^19.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/[email protected]
npm error node_modules/@react-spring/web
npm error @react-spring/web@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

Link to repo

https://github.com/pmndrs/react-spring

@Psli Psli added the template: bug This issue might be a bug label Dec 7, 2024
@joshuaellis joshuaellis added kind: request New feature or request that should be actioned and removed template: bug This issue might be a bug labels Dec 7, 2024
@joshuaellis joshuaellis changed the title [bug]: React 19 support React 19 support Dec 7, 2024
@utkuoruc
Copy link

utkuoruc commented Dec 7, 2024

so no react 19 support?

@joshuaellis
Copy link
Member

Not yet no, but im hoping to work on it this month.

@abbaty48
Copy link

I'm still waiting for react19 support, I'm stuck here on upgrading a project, any intel

@centraldogma99
Copy link

centraldogma99 commented Jan 13, 2025

hello @joshuaellis , Is this work in progress? This is not meant to rush you, but I’m asking to get an estimate of the timeline.

@ChrisCrossCrash
Copy link

Hi, @joshuaellis . Could you please provide a status update on this issue?

I noticed that there is a draft pull request that has yet to be merged. I guess there was some kind of problem with the tests not being compatible with React 19 in the test environment? Are you just waiting on an upstream fix for that problem?

@murm
Copy link

murm commented Feb 3, 2025

Is there any estimate on this one?

Have a great one!

@Emiliano-Bucci
Copy link

Can we deal with it in the mean time? It's annoying the fact that I can't update to latest react version because of this

@tim-soft
Copy link

tim-soft commented Feb 7, 2025

Anything I could help with? Does anyone know what the blockers are?

This is the last dep I need to deal with to move many projects to React 19

Love the library

@m-mudassar
Copy link

m-mudassar commented Feb 11, 2025

It is the only library in my project incompatible with React 19. Is there any expected time?

@FISEM
Copy link

FISEM commented Feb 22, 2025

They don't seem to care about react 19. Poor react 19 !

@ackle-dev
Copy link

They don't seem to care about react 19. Poor react 19 !

@FISEM there is a draft PR to fix this

@sanjaya-sena
Copy link

For now use this to install.

npm install @react-spring/web --legacy-peer-deps

@buzzo123
Copy link

npm install @react-spring/web --legacy-peer-deps

doesn't work

@vector-omalyutin
Copy link

vector-omalyutin commented Feb 25, 2025

npm install @react-spring/web --legacy-peer-deps

doesn't work

Alternatively, you can enforce the usage of your project's React version in npm by adding the following to package.json:

  "overrides": {
    "@react-spring/web": {
      "react": "$react",
      "react-dom": "$react-dom"
    }
  }

This only works with npm, for yarn you need to use resolutions

@apollocoder
Copy link

This takes too long. I'm seriously considering to drop this library from my projects. React 19 has been out months ago. Supporting the current React version is essential for a React library.

@alexander-elder
Copy link

We also switched to motion a while ago

@tam315
Copy link

tam315 commented Mar 12, 2025

@FISEM
I also switched motion and code conversion was very easy via Roo Code + Claude Sonnet 3.7.
Finally I got React v19, Thank you for information!

@KieranTH
Copy link

This takes too long. I'm seriously considering to drop this library from my projects. React 19 has been out months ago. Supporting the current React version is essential for a React library.

Yeah... any new projects will also be defaulted to React 19 - Via Vite, Next or Tanstack. This is also a downstream dependancy for alot of projects - meaning there'll be even more refactoring and upgrades due once this is finished.

Is there any estimated timeframe for this? Otherwise I imagine many people will have to consider migrating to another library - Others have already mentioned that above

@abriginets
Copy link

It's been almost 4 months since React 19 RC was released...

The worst part is that there are a lot of 3rd party libraries depending on react-spring and it blocks them too from supporting React 19, like MUI-X. They simply cannot switch or internalize quickly and be done with it 😞

@Sultan-papagani
Copy link

switched to motion as well

goodbye spring

@qlqllu
Copy link

qlqllu commented Mar 13, 2025

Any updates?

@m10
Copy link

m10 commented Mar 13, 2025

I understand the frustration but it is useless to spam this issue.
I am sure the maintainers will update the issue when there is something to say.
Spamming will not speed up anything and frustrate others.
If anyone needs this badly they should contribute constructively.
Thank you. Happy coding!

@Sultan-papagani
Copy link

"Spamming will not speed up anything or cause frustration."

Not sure why that would be the case, but either way, no one cares.

no one is a react library fan. if they dont support 19, just remove it and move on.

@abriginets
Copy link

Spam will stop immediately as soon as there is an update. People are frustrated mostly over maintainer's promise to work on it then abandoning the work with no further notice. I could contribute but should I invest my time in onboarding on an entirely foreign library I've never worked with when the PR is already open for what I'm about to do? Should I spend 3 days working and getting around many issues only to see maintainer reappearing out of nowhere, completing the work and merging his PR in 5 minutes?

Communication has always been the key. Otherwise people will keep coming and asking endlessly.

@alexkunin
Copy link

Surprisingly, installing previous version of @types helped:

npm i -D  "@types/react"@"18.3.1"  "@types/react-dom"@"18.3.1"

It did not break anything, the project builds, at least some 19 features work (ref as prop is one of them).

@dougogodinho
Copy link

switched to motion as well

@boredjoker
Copy link

pnpm overrides react version is worked, but switched to motion as well

@GeraldoMaciasLADodgers
Copy link

Looks like all the tests are passing now. Hopefully we get the update released very soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core relates to core classes // parts of the library kind: request New feature or request that should be actioned
Projects
None yet
Development

Successfully merging a pull request may close this issue.