retainSearchParams
How does retainSearchParams actually work?
When i have routes /tasks and /tasks/$taskId
If i go from /tasks to /tasks/123 u want to retain search params, but it actually doesn't. how come?
4 Replies
sunny-greenOP•3mo ago
For this to work do i really need to add
search={(prev) => prev}
to search Link?other-emerald•3mo ago
You could also just pass to to keep the search while navigating.
sunny-greenOP•2mo ago
It doesnt keep the search params while navigating to child routes though.
Should i use the LInk the Route exposes like
<Route.Link> to make this work?
other-emerald•2mo ago
Can you provide some code example?