import { loadStripe } from '@stripe/stripe-js';
const apiKey = `${process.env.REACT_STRIPE_PUBLIC_KEY}`;
const stripePromise = loadStripe(apiKey);
After the promise is fulfilled, _apiKey in the stripePromise object is undefined.
Have been stuck on this error for days. Anyone care to help.
Thanks and much appreciated