Stripe stops working with React.JS 17

221 views
Skip to first unread message

Igor Shmukler

unread,
Apr 26, 2021, 11:17:17 PM4/26/21
to Stripe API Discussion
Hello,

I am using Stripe Elements with React. It is working fine with React
version 16.13.1. However, when I upgraded 'react' and 'react-dom' to
version 17.0.2, Stripe stopped working. I am getting errors like "you
could create only one element of type cardNumber" etc, for all
elements. Those, I understand are mount-related issues...

My project is running @stripe/react-stripe-js version 1.1.2.

Please advise,

Igor Shmukler

Remi J.

unread,
Apr 26, 2021, 11:20:08 PM4/26/21
to Stripe API Discussion
Hey Igor,

We do support React 17 but we added support on 1.2.0 as you can see on the release version: https://github.com/stripe/react-stripe-js/releases/tag/v1.2.0

I'd recommend upgrading to the latest version (1.4.0) which should solve your issue. If it doesn't, we'd need some more details and exact code to help you debug this. You'd have more luck with our support team in that case: https://support.stripe.com/contact

Best,
Remi

--
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Igor Shmukler

unread,
Apr 27, 2021, 12:17:58 PM4/27/21
to Stripe API Discussion
Thank you, Remi.

Updated @stripe/react-stripe-js to 1.4.0 and @stripe/stripe-js to
1.13.2. Those are working fine with React.JS 17.0.2. Thank you.
Reply all
Reply to author
Forward
0 new messages