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
rare-sapphireOP•6mo ago
For this to work do i really need to add
search={(prev) => prev} to search Link?xenial-black•6mo ago
You could also just pass to to keep the search while navigating.
rare-sapphireOP•6mo 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?
xenial-black•6mo ago
Can you provide some code example?