I am trying to follow this guide: https://tanstack.com/router/v1/docs/framework/react/guide/router-context#how-about-using-react-contexthooks
Unfortunately <RouterProvider router={router} context={{ networkStrength }} /> is not working for me since router.tsx does not provide the router directly. Instead it exposes a getRouter. Doing <RouterProvider router={getRouter()} context={{ queryClient }} /> throws an error.
Package versions:
"@tanstack/react-query": "5.90.21",
"@tanstack/react-router": "1.159.10",
"@tanstack/react-start": "1.159.13",
"@tanstack/router-plugin": "1.159.12",
TanStack Router's router context is a very powerful tool that can be used for dependency injection among many other things. Aptly named, the router context is passed through the router and down throug...