Hi guys, I've been trying to solve this for hours - how do I transform search params in a way that doesn't break the retainSearchParams middleware?
Use case: supporting multiple formats of the same search param (e.g. for backwards compatibility):
/?rootvalue=abc-> should map to rootValue/?rootValue=abc-> should map to rootValue as well- If both are present, only the expected one gets used.. you get the idea
Here's a demo: https://stackblitz.com/edit/tanstack-router-retain-nok-21zpypb5?file=src%2Froutes%2F__root.tsx
I thought using zod schema with .transform() would work, and it kinda does, but it completely breaks the retainSearchParams middleware. Is there another way to approach this?