← Lessons

quiz vs the machine

Platinum1780

Frontend

Micro Frontends

Let independent teams own and ship slices of one large app.

6 min read · advanced · beat Platinum to climb

The idea

Micro frontends apply microservice thinking to the browser. A large application is split into pieces, each owned by a team that develops, tests, and deploys independently, then composed into one experience.

Composition approaches

  • Build time: pieces published as packages and assembled in a host build. Simple, but every change forces a host rebuild and redeploy.
  • Server side: a server stitches fragments into the HTML response.
  • Runtime: the host loads remote modules in the browser, often via Module Federation, so teams deploy on their own cadence.

The hard parts

  • Shared dependencies: ship React once, not five copies, or bundles balloon.
  • Consistency: a shared design system keeps the seams invisible.
  • Communication: pieces interact through events or a thin shared contract, not deep coupling.
  • Routing: the host shell owns top level routing and hands off to fragments.

When it is worth it

Micro frontends pay off at organizational scale, where independent deployment outweighs the added complexity. For a small team it is usually overkill.

Key idea

Micro frontends let teams independently deploy slices of one app, trading composition complexity for organizational autonomy.

Check yourself

Answer to earn rating on the learn ladder.

1. What is the main benefit of micro frontends?

2. Why share dependencies like React across micro frontends?