T
TanStack2y ago
grumpy-cyan

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
extended-salmon
extended-salmon2y 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...
optimistic-gold
optimistic-gold2y ago
@h3llo Just tried this out and it looks to be working. Please create an issue on Github with a reproduction.
graceful-blue
graceful-blue2y ago
I think I ran into the same issue. It seems to be related to React.StrictMode https://discord.com/channels/719702312431386674/1237388435937820813
fascinating-indigo
fascinating-indigo2y ago
Yeah we're still experiencing it too, even after the fix. Sounds reasonable that it's because of strict mode
grumpy-cyan
grumpy-cyanOP2y 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?