#george
1 messages · Page 1 of 1 (latest)
Sure, the following combines both UMD and react usage:
I suspect it's probably the combination of v2 UMD + v3 npm package
Hi! I'm taking over this thread.
Can you clarify why you need both v2 and v3 version on the same page?
We have an existing UI form component using Stripe V2 loaded as UMD. We are not ready to migrate this form to v3 yet, so, for now, in order to support google/apple pay we decided to have both versions
Got it. But yes your code mounting the element: <Element stripe={...} option={...}> looks correct to me and is similar to what we have in the doc here https://stripe.com/docs/stripe-js/react#elements-provider
So yes it looks like you can't use both V2 and V3 in this case
So I would recommend to migrate entierly to V3.
I have a feeling the <Element /> component actually uses the v2, instead of v3, thus causing the error. It's kinda of hard to debug since this happens only when on the first load of the page :), after a refresh it works properly