#dl - PaymentElement load check
1 messages · Page 1 of 1 (latest)
I believe their is an event you can listen to for when it is properly loaded. Checking our docs and will get back to you
Thanks!
As GigStartr said, there is an event for when the element is ready https://stripe.com/docs/js/element/events/on_ready
My code sample:
sigh
<form onSubmit={handleSubmit}>
{showSpinner && <SpinnerDiamond />}
<PaymentElement
onReady={handleReady}
options={{ business: { name: COMPANY_NAME } }}
/>
<div>{error_message ? error_message : null}</div>
<button
className="button"
type="submit"
disabled={!stripe || showSpinner}
>
Submit
</button>
</form>
ok sweet. thank you both!