TanStackT
TanStack2mo ago
6 replies
rubber-blue

useQuery keeping the whole page in loading state

Hey guys. This might seem a bit weird but I'm using start with solid and whenever i use a simple query and it resolves and the loading state becomes false, it still keeps the tab in a loading state even thought everything works


  const modeAlertsQuery = useQuery(() => ({
    queryKey: ['alerts', 1],
    queryFn: () => {
      console.log('Fetching operating mode alerts...')
      return 10
    },
  }))
  return null


even this with no loaders and just the simples setup causes the tab to be kept in a loading state. any idea what could be the issue?
Was this page helpful?