#retainSearchParams

4 messages · Page 1 of 1 (latest)

acoustic thicket
#

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?

#

For this to work do i really need to add search={(prev) => prev} to search Link?

pearl latch
#

You could also just pass true to retainSearchParams to keep the search while navigating.

acoustic thicket
#

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?