Picture this. Three teams work in the same frontend repository. One team wants to upgrade React. Another is in the middle of a critical feature. The third just found a bug in production. Any change from one of them can break the work of the other two.
Deploys turn into coordination events: a meeting before, a meeting after, someone always waiting on someone else. The system works, but nobody can move fast.
That is the problem microfrontends try to solve. The solution only makes sense if you have actually felt that pain.
What microfrontends are, without the jargon#
You have probably heard of microservices on the backend: instead of one monolithic API, you have smaller, independent services, each with its own responsibility, its own deploy, and its own team.
Microfrontends apply the same logic to the frontend. The interface is split into smaller parts, and each part is developed, tested, and released independently.
A metaphor helps. Think of a city. The subway doesn't depend on garbage collection to run, and the hospital doesn't wait for city hall to renovate the library before treating patients. Each service runs on its own, but they all share the same city and serve the same residents.
Your application is the city. Each microfrontend is a city service.
The monolith isn't the villain, it just has limits#
"Monolith" isn't a dirty word. If your team is small, the application is mid-sized, and deploys go smoothly, the monolith is the right choice: less complexity, less infrastructure, less coordination.
A monolith in pain:
- 3+ teams in the same repository
- Deploys cause conflicts between teams
- Upgrading one library breaks another part of the app
- Code review has become a bottleneck
- Rewriting any part feels too risky
A healthy monolith:
- Small team, manageable codebase
- Simple, predictable deploys
- Clear context for the whole team
- No coordination overhead
- Fast to iterate
Microfrontends solve problems of scale, both team scale and product scale. If you don't have those problems yet, the architecture will create more complexity than it removes.
How it works in practice#
Every microfrontend architecture has a central piece: the Shell (or Host), the application that assembles the parts. It works like the frame of a jigsaw puzzle: it holds none of the picture, it only decides where each piece goes.
Shell (Host) — loads, composes, and routes
├── MFE: Catalog (Team A · React 18)
├── MFE: Checkout (Team B · Vue 3)
└── MFE: Profile (Team C · React 19)Each microfrontend can use a different stack. Team A is on React 18, Team B chose Vue, and Team C has already moved to React 19. They all live in the same final application, and users never notice they are separate systems.
The most common technology for this is Module Federation, a Webpack 5 feature that lets applications share modules at runtime without bundling them together.
// webpack.config.js for the Catalog MFE
new ModuleFederationPlugin({
name: "catalog",
filename: "remoteEntry.js",
exposes: {
"./Catalog": "./src/Catalog",
},
shared: ["react", "react-dom"],
});
// webpack.config.js for the Shell, consuming the MFE
new ModuleFederationPlugin({
name: "shell",
remotes: {
catalog: "catalog@http://localhost:3001/remoteEntry.js",
},
shared: ["react", "react-dom"],
});What is remoteEntry.js? It's the microfrontend's entry point: a file the Shell reads at runtime to find out which modules are available. Each MFE publishes its own, and the Shell only needs to know the address.
What each team actually gains#
Articles about microfrontends talk a lot about autonomy, but on its own the word is abstract. What changes day to day?
Independent deploys#
The Checkout team finds a critical bug in the payment flow. They fix it, test it, and ship it without telling the Catalog team and without waiting for the Profile team to finish the feature they're working on. The rest of the application stays as it was.
Technology that fits the context#
Different parts of a system have different needs. An admin panel full of tables and filters might benefit from a specialized data grid library, while the marketing area might want a lighter framework. Each team picks the right tool for its own problem, and that choice doesn't spread to the whole system.
Incremental migration#
A legacy Angular 8 monolith that nobody wants to touch can be wrapped gradually instead of rewritten from scratch, which would take months and freeze the product. New features ship as modern microfrontends, and the legacy code shrinks without stopping the business.
Netflix, Spotify, and IKEA use variations of microfrontends to solve exactly this: large teams, complex products, and the need to move fast without breaking what already works.
The real costs#
Microfrontends come at a cost, and ignoring it gets expensive.
Infrastructure complexity#
You go from one repository and one deploy to multiple repositories, pipelines, and production URLs. Each microfrontend needs its own CI/CD, and the Shell has to know where every MFE runs in every environment. That takes a level of DevOps maturity many teams don't have yet.
Visual consistency#
If every team is autonomous, who makes sure the buttons share the same style, the spacing is consistent, and the typography matches? The answer is a shared Design System, and maintaining one well is a job in itself.
Watch out for the Frankenstein effect. Autonomy without standards turns into visual chaos. Users don't know there are different teams behind the screen; they just see an inconsistent application.
Performance#
If the Shell loads three microfrontends and each one ships React in its bundle, React runs three times. Module Federation's shared option fixes this, but it needs careful configuration. Without that care, the payload grows fast.
Communication between MFEs#
At some point, one microfrontend will need to talk to another. When a user logs in through the Profile MFE, the Catalog MFE needs to know so it can show their favorites. Keep that communication to a minimum. The safest mechanism is browser events, with no direct dependencies between MFEs.
// Profile MFE fires an event after login
window.dispatchEvent(new CustomEvent("user:loggedIn", {
detail: { userId: "42", name: "Ana" }
}));
// Catalog MFE listens without direct coupling
window.addEventListener("user:loggedIn", (e) => {
loadFavorites(e.detail.userId);
});When it makes sense, and when it doesn't#
The question that matters is whether your context justifies this complexity.
It makes sense when:
- Multiple teams work in parallel on the same application
- The monolith is blocking deploys and coordination
- Parts of the system have very different life cycles or technical requirements
- You need to migrate a legacy system without stopping the product
It doesn't make sense when:
- You have a small, aligned team
- The application is mid-sized and manageable
- You're still discovering the product and change direction often
- Nobody on the team has experience with distributed systems
What to take away#
- Microfrontends apply the logic of microservices to the frontend.
- The Shell composes and routes; the MFEs are autonomous and independent.
- Module Federation is the most common technology for runtime composition.
- Independent deploys are the most concrete benefit: teams move without blocking each other.
- The price includes more infrastructure, a Design System, and attention to performance.
- Before adopting it, ask whether your problem justifies the complexity. If it doesn't, the monolith works fine.
