1

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.

Gwhyyy
  • 7,554
  • 3
  • 8
  • 35
alexer
  • 21
  • 3
  • 1
    We 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 Answers1

1

I had the same issue. It turned out that I was using <Link to='' />. Changing it to <Button /> fixed the issue.