#haluk1195_elements-provider-error
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1390476544056754197
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
This is the UI i'm trying to build
but switching between prices triggers the following alert messages
Hi there,
reading your question, what exactly are you trying to accomplish with the key mapper?
okay there are a few key mappers in there but basically each price has its own PaymentsSheet so when they click on a new price i loadStripe for that specific match urgency
I don't mind sharing more of the code but idk how helpful that'll be
Ok gotcha. That is the problem. Once the Elements provider is loaded and rendered, you can't change the stripe prop anymore
https://docs.stripe.com/sdks/stripejs-react?ui=elements#:~:text=DESCRIPTION-,stripe,-required
so how can i achieve the front end experience that i'm shooting for?
I am not clear why you would need to re-load loadstripe depending on where the user clicks on. Can you explain that a bit more please?
so the prices are different between the payment sheets
But the stripe prop normally only contains basically the publishable key. Product and pricing are used in the checkout form. Not in the Elements provider.
oh so if i only use one stripe prop then i should be good? let me try that really quickly
yes, you only need one stripePromise resolved through loadStripe function with the pubslihable key for the Elements provider.
niceeeeee
Sounds like it works?
Yeah no longer getting the same err
Sweet
thanks cutie
No problem. Anything else I can help you with?
have a safe weekend!
Thank you, you too!