Replies: 2 comments 1 reply
-
|
Adding keywords: microfrontend mfe microfrontends mfes vmfe module Federation |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
In a different context, I've seen __root beforeLoad somehow running before the Routerprovider itself rendered. It's embarrassing and doesn't sound true but it definitely was happening. I thought... Maybe RouterProvider is a class component and react is pre-constructing the components... But idk never got to bottom of it |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
in my company we are using tanstack/router with single-spa framework. We migrated from react-router and when navigating between MFs using single-spa navigation we spotted issue where
route.useParamswould return old route param ID whenbeforeLoadandloaderwould return current ID present in URL. Only after some 300-500msroute.useParamswould catch up and after that in app navigation with tanstack router methods would work flawless.After investigation I found out that recreating client on single-spa mount lifecycle resolved issue. I tried
.clearCachemethod on unmount, but it doesn't affect this issue. Basically router client was staying in memory and with some state that after navigating into MF would cause delayed sync.Has anyone encountered similar issue? Why beforeLoad is instant reading from URL where useParams is reading from some context and is out of sync?
Beta Was this translation helpful? Give feedback.
All reactions