#Emmanuel G.
1 messages · Page 1 of 1 (latest)
Hello
Yep useStripe is async so you shouldn't render your element until it is resolved.
Okay thats good to know
Does that already get handled by the parent where I pass the promise into,
That's why in a lot of the samples you will see if (!stripe || !elements) { // Stripe.js has not yet loaded. // Make sure to disable form submission until Stripe.js has loaded. return; }
That just disables the button, Just to play it safe though make sure the promise resolved and then render after that has happened.
I suppose to clarify, you can render the Element if you so desire (that is actually going to be dependent on your Elements provider and loadStripe)
So yeah sorry I think I made that confusing
Right
Cool Thanks for the info.