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
Recommend way to navigate when destroying with TanStack Query
Resetting InfiniteQuery on navigate replace
useInfiniteQuery to populate the select items. On form submit, the page refreshes via useNavigate with replace: true and the form values as the search parameters. But if I check the field again after navigation, the items in the select field are the values of the next page of the useInfiniteQuery before I submitted the form.
I was hoping to ask what I can try to maybe reset the query to the first page again when it navigates to the same page. Thank you! (I'm actually not sure if I should post this here or on Query)...Why Route.id is undefined?
useParams behavior change?
useParams on routes that aren't in the current route?
const { slug} = useParams({ from: "/path/$slug" });
Invariant failed: Could not find an active match from "/path/$slug"...createLazyFileRoute missing types ?

Can you use zod to validate params (not search params but actually params)?
Why don't my routes' error and loading components respond predictably to react-query devtools
errorComponents and pendingComponents by clicking on the corresponding triggers in the react-query dev tools but I'm getting mixed results.
Here's my simplified Codesanbox:...
Correct usage of `createLink`?
createLink to combine the Link component from react-router with the Link component from chakra-ui. However, the resulting component results in only having the key & ref props; no props from either of the Link components. I also get an error locally:
``
console.js:213 Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Check the render method of ForwardRef(Link2)`....How to use additive context?
Type of children's route params in parents
_layout.tsx
- _layout.$orgId.tsx
The params in _layout.tsx's loader seem to include the orgId param, but it's not reflected in the type. Am I missing something?...Optimum way to use route context in a component?
Why used axios instead of react query in example?
Is it just me or does HMR sometimes put the router into very strange states?
/document/edit/$id as shown in the preview bar).
I have also noticed an issue (after HMR) where context-consuming components will sometimes cause the app to blow up as if they are being used outside of their corresponding context provider, even though they are not. Again, this seems to depend on which part of the DOM tree was hot-reloaded....
Go Back button with reference to location before entering sub-route
/$workspaceId
/$workspaceId/$fileId
/$workspaceId/$fileId/studio
/$workspaceId/settings...memoized route components
/products/ to /products/5, I get re-renders for the components in:
- __root.tsx
- /products/route.tsx
- /products/$id.tsx
...How to initiate search params from initial api response without triggering re-fetch?
/data endpoint.
2. /data returns parameters that come with some initial parameters (let's say { page: 1 })
3. I add these parameters from the response to the url address as search params so I can use them via useSearch in the UI (e.g. to show we're on Page: 1)
4. Search params changed which are part of the respective /data query keys and re-trigger the query basically returning the exact same thing as without any search params.
...How to redirect from an intermediate route to a specific route?
/vouchers/creation/create
/vouchers/creation/output...Is it a good idea to pass the route to a Component?
route.fullPath or the route.id and the numerous hooks at a child component.
Here's my code:...What should be the type of prop that needs to be passed to "to" option of redirect function
search params prev type not inferred
search prop as described here: https://tanstack.com/router/v1/docs/framework/react/guide/navigation#search-param-links
I implemented a simple counter (reproduction here: https://stackblitz.com/edit/tanstack-router-scf3nc?file=src%2Froutes%2Fabout.tsx,src%2Froutes%2Findex.tsx) and I noticed two things:
1) prev is inferred as:...