Navigating between Micro-Frontends with TanStack Router's <Link> component
Hi everyone,
I'm working on a monorepo with multiple micro-frontends using single-spa and module federation. I'm using TanStack Router for routing within each micro-frontend.
I'm trying to figure out the best way to extend the <Link> component so it can navigate between these micro-frontends. I have a basic implementation that removes the
basepath
when ignoreBasePath
is set to true
, but I'm not sure if this is the most efficient or recommended approach.
Here's my current code:
Does anyone have experience with this scenario? Are there any best practices or recommended patterns for navigating between micro-frontends using TanStack Router?
Thanks in advance for your help!2 Replies
ambitious-aqua•13mo ago
how is the route tree built? a single one or one for each micro front end?
stormy-gold•12mo ago
@Manuel Schiller i did not originally ask this question, but I'm doing something similar. What if I was building the route tree for each micro front end? (And the host app as well)