Skip to content
Source
Sign inSign up
TanStack/router

router status never changes from "pending" #1552

Send to my agent
ClosedSeanCassiere opened this issue 0 comments
SeanCassierecommented

Describe the bug

From a Discord thread: https://discord.com/channels/719702312431386674/1235498104317284372

The Router's status never changes from "pending".

So when you use this code-snippet, it always stays as "pending" even after the page has loaded.

const status = useRouterState({ select: (s) => s.status });

Your Example Website or App

https://stackblitz.com/edit/github-zdscfw-ekwvlx?file=src%2Froutes%2Findex.tsx

Steps to Reproduce the Bug or Issue

  1. Go to /
  2. Observe the status remains as "pending" even after the page has completed loading.

Expected behavior

As per the reference documentation, it should return to "idle" once done.

https://tanstack.com/router/latest/docs/framework/react/api/router/RouterStateType#status-property

Screenshots or Videos

No response

Platform

  • TSR Version: 1.31.7

Additional context

"I bisected the versions, and it looks like it was introduced in v1.28.8. We've pinned to v1.28.1, so I didn't notice before" - Jakob Norlin

  1. SeanCassiere added labelsbug

  2. SeanCassiere closed this

Sign in to join this conversation.