How it works · 42 of 49 Advanced
What are micro-frontends?
One web page, several teams
Micro-frontends: Micro-frontends split one web page into parts that separate teams build, test and ship on their own; a container page stitches the parts together as it loads, so one team's release no longer waits for the others.
Loading the animation…
Say it like this Micro-frontends split one web page into parts that separate teams build, test and ship on their own, and the page stitches them together; the price is more bytes and a look you must keep consistent on purpose.
Under the hood — for builders
- Worked example: Cam Jackson's food-delivery site
- Jackson (martinfowler.com, 2019): "Imagine a website where customers can order food for delivery." There is "a landing page where customers can browse and search for restaurants"; "Each restaurant needs its own page that shows its menu items"; and "a profile page" for order history. Each is a separate micro frontend, owned by one team, joined by a container application.
- The sources, in their words
- Jackson: "An architectural style where independently deliverable frontend applications are composed into a greater whole"; "independent deployability of micro frontends is key"; "each micro frontend should have its own continuous delivery pipeline". Geers (micro-frontends.org): "a composition of features which are owned by independent teams." Thoughtworks Radar: each feature "developed, tested and deployed independently from other features."
- Terms
- Container (or shell): the page that loads the parts. Build-time integration: parts published as packages and built into one bundle (Jackson advises against it). Run-time integration: the page fetches each part as it loads, by iframe, a JavaScript entry point, or a Web Component ("an HTML custom element"). Server-side composition: "rendering HTML on the server out of multiple templates or fragments".
- Run here: one change, what users fetch again
- We took this site's own five feature folders as five teams' squares and added one line to tools. As one bundle, the file's hash changes and users fetch all 73.3 KB again; as separate parts, only tools changes: 8.9 KB, 12% of the page.
- Run here: the cost of every team bringing its own
- Jackson warns that some set-ups "can lead to duplication of dependencies", "increasing the number of bytes our users must download". React 18.3.1 with react-dom, minified and gzipped, measured 43.4 KB; if three teams each ship their own copy, the page carries 130.2 KB; five teams, 217.0 KB.
- Measure it
- Releases a week per team, and how many wait on another team · bytes per page and how many copies of each library it loads · visual differences between parts (buttons, fonts, spacing).
- Watch out
- Jackson: autonomy "can cause fragmentation in the way your teams work"; a shared library can "quickly become a hodge-podge of inconsistent code"; "CSS as a language is inherently global, inheriting, and cascading". Geers: "Namespace CSS, Events, Local Storage and Cookies to avoid collisions and clarify ownership." With server-side composition, "the slowest fragment determines the response time of the whole page."
- Sources
- Cam Jackson, "Micro Frontends", martinfowler.com, 19 Jun 2019 · Michael Geers, micro-frontends.org · Thoughtworks Technology Radar, "Micro frontends" (2016–2020) · all read in session · bytes runs, Node, 21 Nov 2026.
What happens in the micro-frontends animation, step by step?
- One web page, five teams. Each square is a small app that its own team builds and ships; the page stitches the squares together as it loads.
- Built as one bundle, a one-line change in the tools square ships the whole page again, and every team waits for the same release. Our run on this site's own code: users fetch 73.3 KB again.
- Your turn: tap any square. Only that square is unpicked and re-sewn, by its own team, on its own day, while the rest of the page stays up.
- The price. Split pages are not smaller: three teams may each ship their own copy of the same library, and each picks its own button.
- A shared pattern book (a design system) and one shared copy of common code fix both. Split the page when teams block each other, not for speed. Next: putting it all together.
What everyday example explains micro-frontends?
A patchwork quilt, each square sewn by a different hand. Each team owns a square; the seams are the agreed edges; one square can be unpicked and re-sewn while the quilt stays on the bed; without a shared pattern book, the squares stop matching.
Why should a team care about micro-frontends?
When several teams queue behind one front-end release, you choose between one codebase with a shared release train and separate parts with their own pipelines; micro-frontends buy team speed with bytes, duplicated tools and work to keep one look.