https://github.dev/tanstack/router/tree/main/examples/react/authenticated-routes
function InnerApp() {
const auth = useAuth()
return <RouterProvider router={router} context={{ auth }} />
}
function App() {
return (
<AuthProvider>
<InnerApp />
</AuthProvider>
)
}
I tried to pass the auth object to the StartClient, however, context.auth is always undefined in beforeLoad function.
Is this even possible to achieve in start? As it magically passes client side data to server's beforeLoad function's arguments?