TanStackT
TanStack10mo ago
29 replies
rubber-blue

Search Params: manually update search params

Hi all.

I just wanted to ask if anybody managed to update the search params manually from a onSubmit function of a Form?

I've used react-routers useSearchParams which returns a tuple of the routes searchparams state and a setter for it.
After the form submit I've used the input fields string to replace the searchparams - and I've got a use effect which checks for changes on the search param for re-rendering, but I'm re-rendering in place display component instead of a full page reload.

I can't find a similar way to do this in Tanstack Router. Any info would go a long way.
Was this page helpful?