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 unit test (jest) route lazyRouteComponent?

Implementing a Table of Contents (hash change scroll issue)
to="#Auth"
). When clicking on one of the Table of Contents links, having the browser scroll down to the anchor that matches the hash is working as expected. The part I'm running into some trouble with is when I try to update the hash as a result of the user scrolling down the content part of the site. When I try to update the hash in the URL, the browser scrolls to the anchor element, but I'd really like to avoid that behavior so the user can scroll at their own pace. I've tried using navigate
, updating the location state using router.buildAndCommitLocation
, and even just trying window.location.hash = '#Auth'
. All of these result in the hash being updated in the address bar, but they also all take over scrolling. I believe the latter is happening because the history implementation is overwriting window.history
to support the router's subscriptions.
I found this PR, which seems relevant to the issue I'm experiencing: https://github.com/TanStack/router/pull/1105#issuecomment-2019026150 (the code causing the scrolling seems to have moved here: https://github.com/TanStack/router/blob/35af575ab4c623556ecdb613ac1c85864f0c95d9/packages/react-router/src/Transitioner.tsx#L146)
If I'm understanding correctly, the recommendation was to try using the Scroll Restoration API. I wasn't able to get that to work either, unfortunately....Is there a way to force throw away the previously rendered instance of the same page?
Router Memory History route not persisting upon page reload
Declarative Link Handling with Async Parameters
Scaffolding a new project fails
Disable link when not allowed to visit
ELECTRON DYNAMIC ROUTES
router.invalidate
router.invalidate
actually does? I'm seeing this function a lot in the examples, and don't know why?Library nuqs
Obtain the pathname of a route outside of React?

Putting auth context in RouterProvider context gives errors

Check if user is in Index Route
ERR_REQUIRE_ESM when running pnpm build for Vite + React project
at Module.<anonymous> (/Users/me/Desktop/project/Frontend/node_modules/.pnpm/@tanstack+router-generator@1.86.0/node_modules/@tanstack/router-generator/dist/cjs/filesystem/virtual/getRouteNodes.cjs:3:1) { code: 'ERR_REQUIRE_ESM'...
Apply _pathless.tsx layout to index.tsx?
_main.tsx
layout to wrap a number of pages and these pages are split into two sub layouts which process auth status, _protected.tsx
and _unprotected.tsx
. I want the index of my route tree (/
) to situate within the _protected.tsx
layout. How can I accomplish this? Prefixing index.tsx
with _protected.index.tsx
does not seem to work. Any help is appreciated!
Storybook with Tanstack Router
I could be doing something wrong, but are the start examples broken for anyone else?

Migrating from React Router is Code-based Routing or Virtual Routing best choice?
Property way to handle not found components with permissions
throws in loader causes errors in console even if there is an error component