Typing the `location` in the `loader` function in `createFileRoute`.
Hi, I've searched all through the internet but I cannot find a solution. I currently have this Route declaration:
The part that's tripping me up is the:
My IDE is complaining that
businessId
doesn't exist on location.search
. Even though my validateSearch
has the rootSearchSchema
which is imported from __root.tsx
And is ALSO passed to createRootRouteWithContext
. Like so:
How do I type the location
inside of the loader
function to tell it that, yes, businessId
exists on location.search
here?1 Reply
rival-black•2mo ago
Data Loading | TanStack Router Solid Docs
Data loading is a common concern for web applications and is related to routing. When loading a page for your app, it's ideal if all of the page's async requirements are fetched and fulfilled as early...