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
Get window width on server
window on the server so I have to wait until the component renders on the client. But, I am getting a flash of incorrect style on the client before I measure the window and set the correct value. Is there a way to get window width (or at least browser type, etc) on the server. I started of with a useEffect solution and have now moved to a useState solution.
```js
const [sm, setSm] = useState(false);
...Use « useSearch » in the root page
How to check for auth with Clerk and Tanstack Start?
Edit and update loader data / Update useState after router.invalidate()
<input> and the backend is supposed to simply append the string "foo". When the user hits save, a POST request saves the data and nothing but 200 OK is returned.
To update the view, i want to call router.invalidate() to update using a GET request.
This works up until the useState for the <input> because useState ignores when it's parameter changes value.
How do i solve this issue? Is there a best practise for being able to edit and update data from a loader?...Get the `from` location when user navigates
from address. How could I do this. Thanks...How would multiple apps with Vite and router looks like?
Accessing Cloudflare Pages Environment Variables
Is using tanstack query inside the route's loader function deferred by default?
``ts
export const Route = createFileRoute('/posts')({
// Use the loader` option to ensure that the data is loaded...Usage of useParams in parent route segment for child param when child is not available
books.$bookSlug.pages.$pageId.tsx and books.$bookSlug.tsx. I try to use const params = useParams({from: '/books/$bookSlug/pages/$pageId'}) in books.$booksSlug.tsx to get the pageId and to show it in the layout when visiting /books/$bookSlug/pages/$pagesId. The route /books/$bookSlug also should be available. But because of the attempt of read pageId with useParams I get the error Invariant failed: Could not find an active match from "/books/$bookSlug/pages/$pageId" when visiting /books/$bookSlug.
I tried using useMatch on /books/$bookSlug/pages/$pageId and only then fetch the pageId paramter, but this seems to violate the "React Hooks must be called in the exact same order in every component render" rule.
How to approach this use-case?...Context not updating
Route.useRouteContext hook to get fetched data (user, todos, etc.) but the data is not updated.
If is a refreshed page (like F5, target _blank, etc.) the data is the default value (fallback).
If you change the current page (using navigate or Link component) the value is loaded normally.
Reproduction: https://stackblitz.com/edit/vitejs-vite-qzfl5f?file=src%2Froutes%2Findex.lazy.tsx...
router devtools visible in production
Retain search params: Cannot use 'in' operator to search for 'rf' in undefined

Updating tanstack router version ^1.75.0 to ^1.82.1
Pending state after mutation
Responsive master detail routes
Tanstack Start and CommonJS modules
routeTree.gen.ts file and white screen without error in web nor terminal
routeTree.gen.ts file with vscode as it's super annoying that it auto generates but doesn't autosave and always somehow changes the formatting where the path of a route changes....
rerender test
npx tsr doesn't generate `index.ts` route
__root.tsx, namely the index.ts route. When Vinxi is running, when I create the index.ts file, it is automatically populated with the following:
```ts
import * as React from 'react'
import { createFileRoute } from '@tanstack/react-router'
...validate search params using Valibot Error
valibot. However I got some error saying that the type doesn't match. Does anyone know how to solve this? Thanks in advance!
Here's my code:
```ts
const AuthErrorSearchSchema = object({...