How can I create token using stripejs and reactjs?

 https://stackoverflow.com/questions/64865267/stripe-react-wrapping-root-application-with-elements-provider

https://stackoverflow.com/questions/60967326/how-can-i-create-token-using-stripejs-and-reactjs

const stripePromise = loadStripe("pk_test_51HhkvNBmZZhLkiuRzN5UwsSHQQbK9y1CALJpr3l23aT7bauIx1JzCdkKlVx26FrtFkFE8QtAUZctcuUtBhRxcqti00grkBypzH",
  {apiVersion: "2020-08-27"});

function App() {
  return (
    <Elements stripe={stripePromise}>
      <CheckoutForm />
    </Elements>
  );
};


const card = elements.getElement(CardElement)
const { token, error } = await stripe.createToken(card)

How can I create token using stripejs and reactjs?

 https://stackoverflow.com/questions/64865267/stripe-react-wrapping-root-application-with-elements-provider https://stackoverflow.com/questi...