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

[Feature Request] React 19 support #540

Open
ZoltanT-RD opened this issue Nov 1, 2024 · 9 comments
Open

[Feature Request] React 19 support #540

ZoltanT-RD opened this issue Nov 1, 2024 · 9 comments

Comments

@ZoltanT-RD
Copy link

What happened?

After updating NextJS to latest 15.x this package stopped working, because of its peer-dependencies. (see log below)
Please add React 19 as a possible peer-dependency.

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: ResDiary-PaymentLandingPage@0.1.0
npm error Found: react@19.0.0-rc-65a56d0e-20241020
npm error node_modules/react
npm error   react@"19.0.0-rc-65a56d0e-20241020" 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 @stripe/react-stripe-js@2.8.1
npm error node_modules/@stripe/react-stripe-js
npm error   @stripe/react-stripe-js@"*" 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.

Environment

No response

Reproduction

No response

@ZoltanT-RD ZoltanT-RD added the bug Something isn't working label Nov 1, 2024
@brendanm-stripe
Copy link

React 19 is still RC and not a stable release, so for now it's not supported/tested. Once that's release I expect we'll work towards updating that to allow 19.

If you're already running pre-release version, you can try disabling those peer deps to test.

@iAmKrug
Copy link

iAmKrug commented Nov 13, 2024

Next.js 15 is now stable and ready for production using react 19 (as of late October) .
https://nextjs.org/blog/next-15

Is the plan still to wait for an official react 19 release? This is currently the only package we use that is not react 19 ready.

@brendanm-stripe
Copy link

Yes, we'll validate once released. Until then please feel free to report any issue you encounter with the RC. We don't expect any breaking changes, since we don't knowingly use any of the features with changes, but this is no guarantee until everything is settled and we're able to test.

@brendanm-stripe brendanm-stripe added feature request and removed bug Something isn't working labels Nov 22, 2024
@brendanm-stripe brendanm-stripe changed the title [BUG]: React 19 incompatibility [Feature Request] React 19 support Nov 22, 2024
@brendanm-stripe
Copy link

Reshaping this as a feature request, since that's the ask here. Currently, nothing is not working as expected.

@ksylvest
Copy link

ksylvest commented Dec 5, 2024

I've opened a PR w/ the peer dependency bump:

#551

In the meantime, it is possible to override (but probably unwise until it has been fully vetted) via the following in package.json then running npm install:

  "overrides": {
    "@stripe/react-stripe-js": {
      "react": "^19.0.0",
      "react-dom": "^19.0.0"
    }
  }

I noticed to properly bump this library a few things need to happen:

  1. The core versions of react / react-dom probably should swap to 19 (or matrix testing).
  2. @testing-library/react needs to be bumped then (which needs some test cleanup).

@brendanm-stripe
Copy link

Thanks all -- now that React 19 is stable, we've exercised our integration tests to verify and should be bumping this peer dependency soon: #552

We're not aware of any incompatibilities (other than SSR/RSC which we do not currently support), since our component are generally thin wrappers around Stripe.js that aren't doing anything elaborate. However, we absolutely want to hear about any issues if you discover them in your integrations.

@jasonsyoung
Copy link

are we waiting for a new version to be available on npm?

@maloun96
Copy link

Following

@brendanm-stripe
Copy link

3.1.0 was published today and includes the updated peer dependency: https://github.com/stripe/react-stripe-js/releases/tag/v3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants