You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create a button that adds a search param using useNavigate (lets say a=tralala)
use useSearchParams to get the search params, render searchParams.get("a");
Expected Behavior
after clicking the button "tralala" will be rendered
Actual Behavior
after clicking the button nothing will be rendered
The text was updated successfully, but these errors were encountered:
@timdorr
I tried to recreate and failed with the links
Its not related to navigate i switched the logic to use useSearchParams and it did not help
why could it happen where It get updated using the the same useSearchParams object but when changing the search params from somewhere else it does not (only when i open the browser)
we use BrowserRouter
This doesn't sound like a bug, just a misuse of the API. Unless you can create a reproduction somewhere (it doesn't have to be StackBlitz), there's not enough information to work with here. You should consult other help resources, like our Discord server.
What version of React Router are you using?
6.15 / 6.14
Steps to Reproduce
create a button that adds a search param using useNavigate (lets say
a=tralala
)use useSearchParams to get the search params, render searchParams.get("a");
Expected Behavior
after clicking the button "tralala" will be rendered
Actual Behavior
after clicking the button nothing will be rendered
The text was updated successfully, but these errors were encountered: