How do i append URL GET parameters? #507
-
Hi I have a form, and i would like to append dynamic parameters to the query string when the fields on the form change How would i go about that with Tanstack-Router? The documentation is still missing parts, it is also still beta soo :) I found defaultStrinfySearch which perfectly creates an URL search query string. However i cant find anything in the autocompleete imports from @tanstack/react-router to push it to the query string? I want to push URL parameters without refresing the page, just pushing them to the url for bookmarks etc Anyone able to help me out ? :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yep. You'll want to check out this example: https://tanstack.com/router/v1/docs/examples/react/kitchen-sink-single-file?file=src%2Fmain.tsx and look for a calls to |
Beta Was this translation helpful? Give feedback.
Yep. You'll want to check out this example: https://tanstack.com/router/v1/docs/examples/react/kitchen-sink-single-file?file=src%2Fmain.tsx and look for a calls to
navigate()
. You can use thenavigate
function to update the URL without changing paths by simply not passing a new path and only passing thesearch
option. If you don't want to make a new entry in the history stack, you can also passreplace: true
.