Menu

1 / 2

Next Federation islands vs. remote components

DEV Community: react·Tariq Khan·about 6 hours ago
#4rsgyAyP
#devtoreact#devto#dev#host#remote
Long article (447 words) — no AI summary yet.
Reading 0:00
15s threshold

Tariq Khan

Posted on Dec 6

Edited on Dec 6

AI-assisted

The first question I'd ask when integrating a piece of UI is who owns the state it needs. A shared search box might need to call the host's search provider. A usage summary might need credentials held by another service. Next Federation offers a different integration for each case.

Choose by where the UI needs to run

Island Remote component

Where server rendering happens On the remote's server On the Next.js host for a verified build

React tree Separate root in the browser Part of the host's tree

Props from the host Plain JSON Client-component props, including callbacks and children from client code

Host React context Stays in the host Available through a shared context module

Delivery HTML, React Flight payload, and assets pinned to a build Module Federation 2.0 module

Architecture

When I'd use an island

I'd choose an island for a panel whose team owns the data and the server code that renders it. The host sends a request with JSON props.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.