TanStackT
TanStack2y ago
5 replies
dead-brown

useRouterState - documentation?

Hi, I saw this in the Kitchen Sink React Query File Based example in __root.tsx:

function RouterSpinner() {
  const isLoading = useRouterState({ select: (s) => s.status === 'pending' })
  return <Spinner show={isLoading} />
}


Is there any documentation for useRouterState(). I like the idea of a global spinner, but I wasn't quite sure how this all worked and so far couldn't find any documentation for this hook.
Was this page helpful?