search params appear in `_strictSearch` but not in `search`
Im encountering a problem where my search params show up in the URL as expected, but wont be available using
Route.useSearch()
.
Using the devtools i can see that they appear in the parent routes search, but only appear in the /page
route under _strictSearch
. Anyone knows how this could happen?

6 Replies
deep-jade•5d ago
can you please create a complete example by forking one of the router examples on stackblitz ?
conscious-sapphireOP•5d ago
i tried creating an example, but im unable to reproduce it. so i guess im just looking for any guesses what could potentially be going wrong.
from looking at it
_strictSearch
includes all search params and search
only contains the ones that passed validation?deep-jade•5d ago
should be the other way round. btw strict search is not public API so ideally you should not worry about that usually
conscious-sapphireOP•5d ago
hm, then its even weirder to me
i found the culprit, it was caused by a sibling routes (
/x/$projectId/_layout/page-b
) search middleware. how can that even affect another route? 😕
the middleware in question, which is part of /x/$projectId/_layout/page-b
(aka sibling route)
why does this seemingly run on /x/$projectId/_layout/page
?deep-jade•5d ago
a search middleware runs for links pointing from one route to another
you should not manipulate the passed in value directly
return a modified copy
i guess that's the issue here
conscious-sapphireOP•5d ago
dang, yea that fixed it
thanks for the help 🙂