T
TanStack17mo ago
foreign-sapphire

Router state is always pending

After updating from 1.29.2 -> 1.31.20, useRouterState({ select: (s) => s.status === "pending" }) always returns true.
5 Replies
sunny-green
sunny-green17mo ago
this should have been fixed by https://github.com/TanStack/router/releases/tag/v1.31.17 @Sean Cassiere can you have a look please?
GitHub
Release v1.31.17 · TanStack/router
Version 1.31.17 - 5/4/2024, 6:22 AM Changes Fix react-router: on initial load the router.state.status does not transition to "idle" (#1559) (fc2859d) by Sean Cassiere Packages @tanstac...
correct-apricot
correct-apricot17mo ago
@h3llo Just tried this out and it looks to be working. Please create an issue on Github with a reproduction.
foreign-sapphire
foreign-sapphire17mo ago
I think I ran into the same issue. It seems to be related to React.StrictMode https://discord.com/channels/719702312431386674/1237388435937820813
sensitive-blue
sensitive-blue17mo ago
Yeah we're still experiencing it too, even after the fix. Sounds reasonable that it's because of strict mode
foreign-sapphire
foreign-sapphireOP17mo ago
sorry for the late reply sean, but yeah, what the others are saying is true. For an example, just take any in the examples in docs and wrap the app inside strictmode @Thijs / TyZ thanks for creating the issue

Did you find this page helpful?