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
How to use useSearch from multiple routes?
/posts
and /posts/$pId
. The /posts
route defines search params with validateSearch
.
In a custom hook I use getRouteApi("/posts")
to receive the useSearch
hook and access the search params. That's fine so far:
```...Read from ReadableStream on page load
ReadableStream
for the AI response, then passing that stream to the chat page with router context. In the chat page I'll start reading from the stream in a useEffect
, but I don't think it's possible to make that effect pure? Since when you attach a Reader to the stream and start reading, you can't abort the read so a cleanup function that detaches the reader could cause an error where the reader tries to read from the stream when it's already detached.
I suspect my general approach to this could just be wrong, would love any suggestions....Loading component only on initial load?
_authenticated
routes). Is there a way to achieve this? If I set a pendingComponent
, this will just run on every page. Maybe I can just use React to achieve thisHow to block, if user wants to leave a route-tree?
create-order
route with multiple steps. So the route-tree looks like this:
create-order/step-1
create-order/step-2
...Typescript error with Vite + file based routing

Auto-redirect when accessing a route
How to avoid "loading" state when using beforeLoad
Optimizing build/bundle size for specific pages
_auth
directory are for when the user is logged in, all the routes in the _public
directory are for when he is not):
```...Prevent `component` from rendering when `beforeLoad` throws an error.
component
from rendering its content when an error is thrown in beforeLoad
.
The docs says the following
This async function is called before a route is loaded. If an error is thrown here, the route's loader will not be called and the route will not render...
How to retrigger the pendingComponent when using `useSuspenseQuery`
pendingComponent
that reveals my pending ui. When I click the limit button I want to retrigger this pending UI, and then rerender the data in my component with the updated data
What actually ends up happening is that it refetches my /api/posts
endpoint, and then the component rerenders, but the pendingComponent
doesn't come back or show.
Here's my component structure...How To Get Previous URL
Documentation in code

Unable to change the title dynamically per page
_root.tsx
```tsx
import * as React from 'react'...Preventing a specific query from triggering `onError`
Is is possible to use the same component for more than one route ?
Debug response with line number?
Navigate to child pages from parent
Should .ts files be ignored by default with file based routing?
routes
-folders I created a .ts
-file (beneath the .tsx
-files) . After creating the file, the generator plugin generates the typical createFileRoute
in that file (and also includes the routes in routeTree.gen.ts
). Obviously this does not work, as a .ts
file does not support JSX syntax. When removing the generated code from the .ts
-file the code is not generated again, but the "route" is not removed from routeTree.gen.ts
(which is inconsistent imho).
I didn't found something in the docs nor the source code, so my question is: should .ts
files be ignored or is it correct that the generator treats them as route files? Personally I'd like to see them ignored, because then I could easily co-locate non-UI files (data loading code, hooks, etc.) with my route files....Update URL hash without scrolling to the element?
Matches after route Param