#uh oh - react events
1 messages · Page 1 of 1 (latest)
which event?
Those are exposed as props you pass handlers to on each element:
<CardElement onChange={...} >
etc
I would like to render a payment element component at the same time as a button together
Thank you!
You probable want onReady={handler} then
thank you!
NP!
Hi, it helped a bit however the Buttons still sometimes appear before the payment element
Is there another way to tackle this issue?
{showButtons && (
<Grid container spacing={2}>
<Grid item xs={6}>
<Button
disabled={isDisabled || isLoading}
onClick={handleSubmit}
>
Submit
</Button>
</Grid>
<Grid item xs={6}>
<Button
disabled={isDisabled || isLoading}
onClick={handleCancel}
>
Cancel
</Button>
</Grid>
</Grid>
)}```
setShowButtons(true);
};```
I'm not too sure how to fix this
Hmm that doesn't seem right. Are you able to share a reproduction of this? In code sandbox or similar?