zod validateSearch without redirecting
and the inner route does:
The zod schema is a looseObject with a bunch of default() fallbacks:
When I navigate to the page without any search params, it works fine and I get immediately redirected (?) to a URL that has all the search params that have zod .default() specified explicitly - I am fine with this behavior. But when I navigate (through a specific URL, in a new tab) to this page with just one of the schema parameters specified, the page crashes in the outer route's loader function.
Upon inspection, context.queries ends up being undefined. Any ideas why this happens?
My workaround is to do this for validateSearch:
This prevents the route component replacement/redirect but still detects parsing errors like it should