When to use tanstack query for loader functions
Following the example here: https://tanstack.com/router/v1/docs/framework/react/guide/external-data-loading
I am using ensureQueryData in my loader to fetch data.
I am questioning the benefit of using loader functions in my app at all, its a complete SPA. Using this method, Im not a fan of missing out on some of the typical react query functionality, such as refetching on window focus.
Wondering what the use case is for loaderFn? I find I would have much more rich functionality just fetching in my components, considering my app is a SPA. But wanted to hear other opinions!
