#vincent_react-update-elements
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/1329493272208474183
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐
Sorry but this is really vague. Can you be much more crisp about what exact options you are trying to pass and what parts you need to be dynamic?
I can be more specific.
I avoided saying this becaues last time i got shut down ๐
The property in question is customPaymentMethods
and it is not supported on the update funciton
i understand that it is a beta feature and this channel is not supposed to discuss it
but our inability to update the element to conditionally show the custom payment method significantly complicates things for us.
to flesh it out a bit more, we want to only show teh custom payment method if the user only selected one-time purchases. if they add a subscription product, the custom payment method should not be available.
You are right, we don't discuss betas here.
Why don't you defer the instantiation of the <Elements> component until you know what values you should specify?
my understanding is that it is supposed to wrap as much of the entire react app as possible for fraud detection purposes
we also have two places where someone can check out. one using express checkout, the other with the payment element
Unfortunately there is no way to update the Elements wrapper without using elements.update()
i see. so if <Elements> was rendered once, and the user does not refresh, changes state so the options object should change, the elements would not be re-rendered with new options?
just trying to be extra clear since this constraint greatly increases scope for us and i dont want to do all that work based on an incorrect assumption
If you change the value of the options object without calling elements.update() or re-creating the <Elements> provider, nothing in the Stripe Elements object will be changed.
Sure thing! I realize it might not be the ideal situation but it's definitely smart to clearly define the boundaries and limitations of your problem space.
Also, you can write in to Stripe Support to express interest in any ongoing betas that might impact this functionality. https://support.stripe.com/contact
thank you very much!
Happy to shed what ๐ก I can ๐