Urgent.News

What's breaking now, across hundreds of outlets.

Tech

What is Next Federation, and when is it worth using?

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…

Next Federation is a library designed to allow Next.js teams to deploy parts of their pages separately from the main app. It enables a remote app to provide a piece of UI that the host Next.js app loads at runtime. This allows for independent UI releases, as the remote app can publish new builds while the host keeps its existing deployment.

The host and remote apps need to agree on certain details, such as which React context the UI reads, where its server code runs, and which JavaScript the browser hydrates after a remote deploy. The compatibility of these details is crucial for successful integration. Once two apps can release independently, Next Federation comes into play.

It supports both the App Router and Pages Router, with Turbopack or webpack as options for the host. The remote components join the host's React tree, with islands rendering on the remote's server and hydrating in a separate root. Hosts can supply a fallback, enforce shared dependency ranges, and verify remote builds before executing server code.

Next Federation may be worth considering if multiple teams already operate separate release pipelines and a Next.js site needs UI from those releases, or if there is a need to move away from @module-federation/nextjs-mf and use the App Router as the host. The library simplifies the integration process, making it easier to move an existing Next.js remote into the new structure.

However, one should weigh the added complexity of runtime composition, including network requests, versioned assets, and trust decisions about remote code. The project is currently at 0.x, so it is recommended to pin its packages when evaluating it. Open the demo and look for the labels around the embedded UI to understand the two modes of operation: one section rendered by a separate server and another running inside the Next.js host's React tree. The repository contains the source code for all the apps mentioned.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Get the news by email. Yesterday's most-covered stories, every morning.

See today's edition · More options

More in Tech

How to migrate from nextjs-mf to the Next.js App Router

If @module-federation/nextjs-mf is the reason your app is still on the Pages Router, you can move the federation integration first and move routes afterward.

  • Isolate UI components and move to remote build servers
  • Create Vite remote project with exposed UI components
  • Replace old import paths with createRemoteComponent wrapper

Your Agent Isn't Bad at Tools. Your Tool Descriptions Are.

Your Agent Isn't Bad at Tools. Your Tool Descriptions Are. Every vendor demo shows an agent gliding through tool calls like it was born to it.

  • Agent's performance depends on tool descriptions, not model intelligence
  • Detailed descriptions critical for tool selection accuracy
  • Validation gate essential between model output and system systems

More from Saturday, 5 December 2026 →