Rerun root route's beforeLoad when calling router.invalidate()?
I have an app where you may log in. When I log in, I'd like to rerun beforeLoad so that
context.user is no longer null. As for React Start, it looks like beforeLoad is exclusively ran on the server, even with ssr: "data-only". This means once the page is loaded, all context from the root route is "stuck" until the page is hard refreshed, not even router.invalidate() can make beforeLoad run.4 Replies
equal-aqua•5mo ago
i cannot reproduce this. can you please provide a complete reproducer project?
xenial-blackOP•5mo ago
Ahh sorry for wasting your time, in my migration from next.js it turns out after creating a queryclient instance that I pass in the context of
createRootRoute, I forgot to remove my old query client provider component and only use the single new queryclientequal-aqua•5mo ago
so does it work now as expected?
xenial-blackOP•5mo ago
Yeah, I'll mark as solved