You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using routerWithQueryClient(router, queryClient) without using createRootRouteWithContext() in __root.tsx leads to an unclear TypeScript error in router.tsx:
Argument of type 'Router<RootRoute<undefined, {}, AnyContext, AnyContext, {}, undefined, RootRouteChildren, FileRouteTypes>, ... 4 more ..., Record<...>>' is not assignable to parameter of type 'never'.
This is an easy thing to miss, so having an error that is easily understood would be good.
Screenshots or Videos
No response
Platform
N/A
Additional context
No response
The text was updated successfully, but these errors were encountered:
leonlarsson
changed the title
Unclear TypeScript error when routerWithQueryClient(router, queryClient) without createRootRouteWithContext()
Unclear TypeScript error when using routerWithQueryClient(router, queryClient) without createRootRouteWithContext()Dec 13, 2024
Which project does this relate to?
Router
Describe the bug
Using
routerWithQueryClient(router, queryClient)
without usingcreateRootRouteWithContext()
in__root.tsx
leads to an unclear TypeScript error inrouter.tsx
:Your Example Website or App
https://stackblitz.com/edit/tanstack-router-csygmngw?file=app%2Frouter.tsx
Steps to Reproduce the Bug or Issue
router.tsx
Expected behavior
This is an easy thing to miss, so having an error that is easily understood would be good.
Screenshots or Videos
No response
Platform
N/A
Additional context
No response
The text was updated successfully, but these errors were encountered: