I built Next Federation for Next.js teams that want to deploy part of a page on its own schedule. A Next.js app hosts the page. A separately deployed app provides a piece of UI. The host loads that UI at runtime, so a compatible remote update can roll out without a new host build.
The word compatible matters. Once two apps can release independently, they need to agree on things a single build would otherwise settle for them. Which React context does the UI read? Where does its server code run? Which JavaScript does the browser hydrate after a remote deploy? Those are the questions the library is designed to answer.
What do you get?
- Independent UI releases. A remote can publish a new build while the host keeps its existing deployment. The host's cache policy determines when new requests pick it up.
- Modern Next.js hosts. The host can use the App Router or Pages Router, with Turbopack or webpack. Next Federation's host adapter uses public Next.js APIs.
- A choice about where code runs. Remote components join the host's React tree. Islands render on the remote's server and hydrate in a separate root.
- Control over failures and upgrades. Hosts can supply a fallback, enforce shared dependency ranges, and verify remote builds before executing their server code.
When would I reach for it?
I'd use it if several teams already operate separate release pipelines and one Next.js site needs UI from those releases. I'd also look at it if I'm moving off @module-federation/nextjs-mf and need an App Router host. The upstream integration is marked deprecated, and its documentation lists Pages Router support. In Next Federation, Next.js is the host and the remote is a separate build, typically Vite. Moving an existing Next.js remote means extracting the exposed UI into that build. Upstream integration docs · Migration guide
If one team can already ship the whole experience comfortably with a workspace package, I'd keep that setup. Runtime composition adds network requests, versioned assets to retain, and a trust decision about remote code. The project is also at 0.x, so pin its packages when you evaluate it.
See both modes on one page
Open the demo and look for the labels around the embedded UI. One section was rendered by a separate server. Another runs inside the Next.js host's React tree. Then open the Pages Router demo to see both modes in that host as well. The repository has the source for all of those apps. Live demos · GitHub repository
If you've been looking for an App Router alternative to nextjs-mf, try one expose from your current setup. I'd like to hear which part of the migration is still awkward.
