Redirect based on tanstack query result in `beforeLoad`
Have a case where I want to redirect based on the result of a query. Is there an idiomatic approach to which query method to use in this case? i.e.
For example:
I've always been using
queryClient.fetchQuery() or queryClient.ensureQueryData()For example:
I've always been using
ensureQueryData() but NOT specifying revalidateIfStale , which I think is the cause of an issue in my app because it's redirecting based on stale data that is never being refetched.