#I tried to use native interface for
1 messages · Page 1 of 1 (latest)
Im not sure where you're getting errors about something being unsafe. You could create your own useSearchParams hook that allows you to mutate params and updates the react state so you could react to those changes in your code.
Such hooks probably exist already
Errors come from when I involve History.replaceState(). Is it not the way to do it?
The History.replaceState() method modifies the current history entry, replacing it with the state object and URL passed in the method parameters. This method is particularly useful when you want to update the state object or URL of the current history entry in response to some user action.
https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState