TanStackT
TanStack3y ago
1 reply
precious-lavender

React router and queryClient.fetchQuery() inside loader make useQuery() to only return 'success'

React router useQuery() is only returning status 'success' when we call queryClient.fetchQuery() inside the loader, when it should be returning 'loading' or 'success', link to codesandbox.io, check src/routes/contact.jsx: https://codesandbox.io/p/sandbox/dark-http-q2zkgk?embed=1&file=%2Fsrc%2Froutes%2Fcontact.jsx%3A24%2C12
CodeSandbox is an online editor tailored for web applications.
dark-http-q2zkgk
Was this page helpful?