zod .catch() in validateSearch create infinity loop
Hey
I have this route:
for some reason adding .catch() in schema make infinity loop and I do not know exactly why this happen.
after some debbuging in found that deleting
beforeLoad function in __root.tsx file make this inifnity loop disappear
here is my __root.tsx
Anyone know why this happen? I would be very gratefull 🙌
Thanks for reading4 Replies
stormy-gold•16mo ago
please you provide a minimal complete example by forking one of the existing router examples on stackblitz , e.g. https://tanstack.com/router/latest/docs/framework/react/examples/basic-file-based
React TanStack Router Basic File Based Example | TanStack Router Docs
An example showing how to implement Basic File Based in React using TanStack Router.
genetic-orangeOP•16mo ago
this is my issue:
https://github.com/TanStack/router/issues/2031
GitHub
Blank screen / loads indefinitely when using validateSearch and loa...
Describe the bug A bug occurs when using the validateSearch method with a custom schema created with zod in the latest version of tanstack/router. Specifically, the bug manifests when the route is ...
genetic-orangeOP•16mo ago
adding this code fix error
or updating to 1.50.0 also helps
stormy-gold•16mo ago
you should always try to update to the latest version in case you encounter a bug, we fix them fast and release often 😁