One history owner
- Decision
- Next.js owns browser history. Each remote runs React Router in controlled mode through a small shared package,
@mfe/router: the location arrives as a prop, and navigation requests go back up through anavigatefunction. A remote can navigate to another one (navigate('/orders/o-1')) without knowing anything about it. - Why
- The alternatives all had a second source of truth. A browser router in each remote would fight Next.js over history, and a memory router mirrored to Next.js needs two-way syncing with loop guards. Next.js routes for every page would make each new route a shell deployment.
- Trade-off
- React Router is bundled into each remote rather than shared at runtime. Router state never crosses a remote’s boundary, and sharing it would save a few tens of kilobytes but tie the remotes’ upgrades together. A remote also cannot bring its own browser router.
- Outcome
- Back, Forward, deep links and refresh need no code in the remotes. Navigating inside a remote made no request to the shell in a production-build test.


