react-query-questions
solid-query-questions
table-questions
virtual-questions
router-questions
react-charts-questions
ranger-questions
vue-query-questions
svelte-query-questions
bling-questions
form-questions
angular-query-questions
start-questions
db-questions
start-showcase
router-showcase
📣-announcements
Release flow details
Posthog and tanstack router
Different "from" values between useNavigate and useSearch
useNavigate
works with from: '/route-a', but useSearch
needs from: '/_pathlessLayout/_nested-layout/route-a'?
```tsx
const navigate = useNavigate({
from: '/route-a' ...
Input loses focus on first render when using navigate
useNavigate
, this works pretty good, however there is one use case where the input loses focus when the page is rendered for the first time and the user types one character.
Is there a way to avoid this problem? This is what I am doing:
```
<TextFilter...metadata template
Edit body class
Using zod `.default` in `validateSearch` causes the route to error out and parents to miss context
.default
in my zod search params schema inside validateSearch
, the page will error out. The cause of this error is a parent high up the tree having mismatched context, which I think is a hydration error similar to what is being described in a related issue here.
Notably, this only happens on one top level tree in my app. For example, site.com/admin/*
works fine, but using validateSearch
anywhere in site.com/user/*
breaks.
/user
will be missing the context from the beforeLoad
in its context, and console logging it shows only the context from the _root.tsx
component....Custom Search Param Serialization
https://example.com/route?country=%5B%22DNK%22%2C%22FIN%22%5D
https://example.com/route?country=%5B%22DNK%22%2C%22FIN%22%5D
https://example.com/route?country=DNK&country=FIN&page=2
https://example.com/route?country=DNK&country=FIN&page=2
React-aria-components & createLink
Recommendations for Zod validated Nested Search Params
fallback()
function from @tanstack/zod-adapter
force their key into the URL (which is just preference, but clutters up the URL bar)...Match active tab with router
Different code splitting behavior when using `autoCodeSplitting: true` vs splitting with .lazy.tsx
autoCodeSplitting: true
so I would expect it to be split into a separate route, but unless I manually split the route using .lazy.tsx
, it gets included in the main bundle when built. Am I misunderstanding how auto codesplitting is supposed to work?Leaflet integration issue
ClientOnly
component but it does not work. Is this because the library is still loaded/evaluated during the SSR ?
Next.js use the dynamic import system but is there an equivalent for the router ? ...Search params with zod
Get the type of the search from a specific route ?
Can I check if a route exactly matches the current location inside a loader function ?
/app/channel/${channelId}/show/${showId}/some_page
...Does the loader guarantee that its internal function completes before the component is rendered?
custom metadata field on createFileRoute
head
property, i can add certain metadata and introspect it at build time by reading the generated routeTree object, but this will end up inserting it into my html. Is there a better place to define build time metadata associated with a route?
Or a way to extend my router to enable this in a type safe way? I've attached 2 screenshots of how i'm reading / writing to the head property currently...