I am facing an issue in react js, there is the route to the page e.g https://localhost:3000/profile?abc=123, the URL is browsed successfully but the issue is when I click on the button (I call API on click of this button using Axios) in my website then the query params in the URL gets removed automatically like this, https://localhost:3000/profile. I have debugged, and the params are removed when the Axios call is initiated. Any help would be highly appreciated.
Asked
Active
Viewed 683 times
1
-
1We can't help diagnose or debug code we can't see. Can you edit the post to include a [mcve] for the relevant code you are working with and have an issue using? – Drew Reese Oct 12 '22 at 15:51
1 Answers
1
I had the same issue. It turned out that I was using <Link to='' />
. Changing it to <Button />
fixed the issue.

user20226153
- 36
- 2