TanStackT
TanStackโ€ข4y agoโ€ข
11 replies
skinny-azure

how to force isLoading state for debugging?

๐Ÿ‘‹

I have a typical component written like that:
const { isLoading } = useQuery(...);

if (isLoading) {
  return <Skeleton ... />;
}

return <ProperComponent ... />;


I wanted to see if my Skeleton component looks properly during the loading state - is it possible to force it somehow? I haven't seen any option like that in react-query-devtools and when I forced
isLoading
state inside react-devtools, I get this error:

Unhandled Runtime Error
TypeError: observer.getOptimisticResult is not a function
Was this page helpful?