stripe / react-stripe-js

React components for Stripe.js and Stripe Elements
https://stripe.com/docs/stripe-js/react
MIT License
1.78k stars 272 forks source link

[BUG]: @stripe/stripe-js version 4.9 #543

Open ArturasTv opened 1 week ago

ArturasTv commented 1 week ago

What happened?

Cannot use newest @stripe/stripe-js version with @stripe/react-stripe-js v2.9.0.

Environment

No response

Reproduction

No response

snigdha920 commented 1 week ago

Indd, this library requires the Stripe type to have a field called initCustomCheckout which has been renamed to initCheckout here https://github.com/stripe/stripe-js/pull/680/files#diff-d1603ffbd359230ed96c01fdb6633edf284f233631393da9aef91d65e8a07042L1271, error:

Type 'import("/Users/snigdhasingh/Development/btp/node_modules/@stripe/stripe-js/dist/stripe-js/stripe").Stripe | null' is not assignable to type 'import("/Users/snigdhasingh/Development/btp/node_modules/@stripe/react-stripe-js/node_modules/@stripe/stripe-js/dist/stripe-js/stripe").Stripe | null'.
                Property 'initCustomCheckout' is missing in type 'import("/Users/snigdhasingh/Development/btp/node_modules/@stripe/stripe-js/dist/stripe-js/stripe").Stripe' but required in type 'import("/Users/snigdhasingh/Development/btp/node_modules/@stripe/react-stripe-js/node_modules/@stripe/stripe-js/dist/stripe-js/stripe").Stripe'
bradpurchase commented 1 week ago

This seems fixed as of 8d3237577959679b2f191bb0f2e1a07af0c9c0f8, and the version has been bumped to v3.0.0 in 885a0d7d9632e3931caa1762ac775e368850409b.

@pololi-stripe this can likely be closed :)