#uh oh - react events

1 messages · Page 1 of 1 (latest)

stray vigil
#

which event?

#

Those are exposed as props you pass handlers to on each element:
<CardElement onChange={...} >
etc

stray vigil
random pumice
#

I would like to render a payment element component at the same time as a button together

#

Thank you!

stray vigil
#

You probable want onReady={handler} then

random pumice
#

thank you!

stray vigil
#

NP!

random pumice
#

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

stray vigil
#

Hmm that doesn't seem right. Are you able to share a reproduction of this? In code sandbox or similar?