Created
June 19, 2020 15:01
-
-
Save SimonHoiberg/02e508a0f3c3265204a9fd433b46931f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const UpdateForm = () => { | |
// Include these hooks: | |
const stripe = useStripe(); | |
const elements = useElements(); | |
const [nameInput, setNameInput] = useState(''); | |
const handleUpdatePaymentMethod = async () => { | |
// Not implemented yet | |
}; | |
return ( | |
<div> | |
<input | |
placeholder='Name on card' | |
value={nameInput} | |
onChange={(e) => setNameInput(e.currentTarget.value)} | |
/> | |
<CardNumberElement /> | |
<CardExpiryElement /> | |
<CardCvcElement /> | |
<button onClick={handleUpdatePaymentMethod}></button> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment