Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it

created 2021/10/02updated 2021/10/02
js
// ❌ // const stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY); // 🙆‍♂️ const [stripePromise, setStripePromise] = useState(() => loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY))