T
TanStack17mo ago
ambitious-aqua

Router.status is always "pending" when you wrap the `RouterProvider` in `StrictMode`.

I noticed that if you wrap the RouterProvider in React.StrictMode, the status of the Router will always be "pending". This also happens with the "basic-file-based" example on GitHub (https://github.com/tanstack/router/tree/main/examples/react/basic-file-based). Is this correct behavior? Due to this issue, you can never get the correct resolvedLocation, because this will always return the first location you visited.
3 Replies
ambitious-aqua
ambitious-aquaOP17mo ago
I have created an issue on GitHub for this https://github.com/TanStack/router/issues/1566
GitHub
Router.status is always "pending" when you wrap the `RouterProvider...
Describe the bug If the RouterProvider is wrapped in <React.StrictMode>, the status of the Router is alway "pending". Due to this issue, you can never get the correct resolvedLocati...
rare-sapphire
rare-sapphire17mo ago
This has been completed as of the 1.31.26 release.
GitHub
Release v1.31.26 · TanStack/router
Version 1.31.26 - 5/9/2024, 12:29 PM Changes Fix react-router: "onResolved" event not being emitted when React.StrictMode is enabled (#1574) (0c01426) by Sean Cassiere Packages @tansta...

Did you find this page helpful?