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
Redirect in loader causes infinite loop
File based routing /post/new route matching
Style/Best Practices
Authenticated routes with tanstack Query requires window reload
Race condition with beforeLoad and routerContext
tRPC in context or constant?
On refresh, always getting redirected to home page.
/sign-in
, redirect to home page.
And the 2nd screenshot is my __root.tsx
component where as soon as my auth is done, I call router.invalidate()
. This makes sure that beforeLoad
runs again....
Lazy loading progress
Need to convert Rust code to run in GPU instead of CPU
Routing with async data
user: User | null
:
```
// app.tsx
const {data: user} = useUser();...How to prevent router from breaking mantine styles
Need help with Breadcrumb component using Shadcn UI and Tanstack Router
Looking to animate my route changes (fade-to-black type thing)
Why might search be persisted through navigation?
navigate({ to: '/some-place' })
(from useNavigate()
)? I cannot for the life of me figure out why, since the default behavior seems to be to clear the search items when navigate()
is called even without explicit search: {}
. In my case, explicitly calling navigate({ to: '/some-place', search: {} })
does not work--the search string is carried through. I cannot unfortunately reproduce this in a sample project...Delay in loading component with tanstack lazy loading
useParams typescript error
const someId =
useParams({ strict: false })?.someId || props.someId;
const someId =
useParams({ strict: false })?.someId || props.someId;
<Link> in RouterContextProvider doesn't navigate to link
@tanstack/react-router
. I'm trying to create a <Link>
between two of these packages. Since package A does not know of the existance of package B, I'm wrapping the URL in a <RouterContextProvider>
with the router being the router in the other package. All is well so far; I get the correct suggestions now and everything seems like it works.
Problem now is, when clicking the link in the browser, the URL in the browser actually gets changed to the correct one, but the browser never navigates away from the page. Is this something I am doing wrong? The <a>
in the browser has all the correct attributes, so I'm kinda confused here....'rules-of-hooks' ESLint rule conflicts with inline route components
plugin-hooks/recommended
is used, the following code causes an ESLint error:const Route = createRoute({
component: () => {
useState() // React Hook "useState" is called in function "component" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use". eslintreact-hooks/rules-of-hooks
const Route = createRoute({
component: () => {
useState() // React Hook "useState" is called in function "component" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use". eslintreact-hooks/rules-of-hooks