#gael_code

1 messages ยท Page 1 of 1 (latest)

sterile peakBOT
#

๐Ÿ‘‹ 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/1267764902173610097

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

fierce oak
#

Hi, let me help you with this.

#

So the total is not updated when you run this?

lethal acorn
#

No, when I click on the payment button, the amount is identical to the first rendering of the button.

#

I store the paymentRequest in a state on the first render then I update it in a useEffect

fierce oak
#

Could you please share a larger chunk of code where this takes place?

lethal acorn
sterile peakBOT
lethal acorn
#

I would like to update the amount when a donation is added to the payment

fierce oak
#

Are you sure the second useEffect is running with the correct amount?

lethal acorn
#

Yes the function seems to work without any obvious error but when I click on the payment button the amount is not the correct one

fierce oak
#

I understand, but have you checked the exact amount within useEffect?

lethal acorn
#

yes you confirm to me that this is the correct method used?

warm seal
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.