How to avoid "loading" state when using beforeLoad - TanStack