#Create query params with an on click handler

2 messages · Page 1 of 1 (latest)

maiden garden
#

I want to create two buttons. Each button will change the query params to something. In my page.js I want to get the query params from the props and do something with them.
Problem is it is very buggy. When I click on each button it does update the url and my page gets the updated query but when I click between them a few times, it stops to update on my page. On the other hand if I have a text input and change the query params with on change, I always get the updated query params. With on click it's not consistently working.
Can anybody shed some light on why is this the case?

neon crescentBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)