#Emmanuel G.

1 messages · Page 1 of 1 (latest)

bronze zephyrBOT
torn jungle
#

Hello

#

Yep useStripe is async so you shouldn't render your element until it is resolved.

wintry holly
#

Okay thats good to know

#

Does that already get handled by the parent where I pass the promise into,

torn jungle
#

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; }

wintry holly
#

That just disables the button, Just to play it safe though make sure the promise resolved and then render after that has happened.

torn jungle
#

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

wintry holly
#

O so that wont load until the is handled

#

Then it should be good to go.

torn jungle
#

Right

wintry holly
#

Cool Thanks for the info.