You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a bit of a trouble with route validators for params and search. When navigating within the app everything works as expected (same as using router on client apps only), but when paired with Start I encountered an issue when entering the page from outside or just reloading the page. Then the validators won't work and page will show as if params or search params passed the route validation.
Minimal example is using create-tsrouter-app with TanStack Start option and has installed Zod, everything else is default with removed example routes.
Home page should have 3 links - 1 valid and 2 invalid
Try all 3 links within the app (navigation with Link component)
You should see Zod error on 2 of these links as expected
Go to one of the invalid routes (you should see error)
Reload the page (F5) or open the url in new tab
The validation fill flash for a moment and route will be rendered and validation skipped and hydration error shows
Expected behavior
The behavior when reloading the page should be same as navigating within app - validation should NOT be skipped. It is working as expected when using router on client only apps. Issue is most likely somewhere within SSR/hydration. App also throws hydration errors on reload.
Screenshots or Videos
2025-03-09.23-01-28.mp4
Platform
OS: Windows 11
Browser: Chrome
Version: 133.0.6943.142
Additional context
Issue originally created on TanStack discord in router questions section.
The text was updated successfully, but these errors were encountered:
Which project does this relate to?
Start
Describe the bug
I'm having a bit of a trouble with route validators for params and search. When navigating within the app everything works as expected (same as using router on client apps only), but when paired with Start I encountered an issue when entering the page from outside or just reloading the page. Then the validators won't work and page will show as if params or search params passed the route validation.
Minimal example is using
create-tsrouter-app
with TanStack Start option and has installed Zod, everything else is default with removed example routes.Your Example Website or App
https://github.com/Rothiusx/tanstack-start-route-validators
Steps to Reproduce the Bug or Issue
Link
component)Expected behavior
The behavior when reloading the page should be same as navigating within app - validation should NOT be skipped. It is working as expected when using router on client only apps. Issue is most likely somewhere within SSR/hydration. App also throws hydration errors on reload.
Screenshots or Videos
2025-03-09.23-01-28.mp4
Platform
Additional context
Issue originally created on TanStack discord in router questions section.
The text was updated successfully, but these errors were encountered: