Micro-frontends
Splitting a frontend across teams: module federation and its trade-offs.
11 lessons 32 practice questions about 1 hours of reading
Start the first lesson
Not started0/43
1
Chapter 1, intermediate
In depth
How it behaves under the hood, and the follow-ups that come next.
- 01How do micro-frontends communicate with each other?
Lesson, 5 min read, then 6 questions to practise
- Design cross-feature event contracts: envelopes, ownership, schema evolution and debugging
- Two React roots are two trees: share state with a portal or useSyncExternalStore
- Implement a memory-efficient event bus with lifecycle cleanup and leak detection
- Build a pub/sub bus with wildcard topics: one-word * and multi-word # matches
- Build an async event bus: per-listener timeouts, serial or parallel, and collected errors
- Implement a secure postMessage communication protocol between a parent page and embedded iframe
- 02How do you isolate CSS in micro-frontends?
Lesson, 6 min read, then 4 questions to practise
- Design a design system used by 20 teams: tokens, theming, versioning and migrations
- Build a web component with shadow DOM, slots and attribute and property sync
- Design a product tour SDK like Appcues: targeting elements, positioning, persistence and no layout breakage
- Design an embeddable poll widget used on thousands of sites
- 03What are the ways to integrate micro-frontends?
Lesson, 5 min read, then 6 questions to practise
- Design a micro-frontend shell with independent deployment and shared dependency versioning
- Build a micro-frontend orchestrator: app lifecycles, route matching, queued navigations and broken apps
- Resolve module specifiers with an import map: imports, trailing-slash prefixes and the most specific scopes
- Design a super-app shell like Paytm or PhonePe that hosts mini-apps: loading, isolation, shared sign-in and versioning
- Design an embeddable customer-support chat widget like Intercom: loader snippet, isolation, real-time messages, unread state and theming
- Design a large enterprise React application with micro-frontends, permissions, and deployment strategies
2
Chapter 2, advanced
Senior level
Trade-offs, edge cases and the questions senior rounds end on.
- 04How do you deploy and version micro-frontends independently?
Lesson, 6 min read, then 3 questions to practise
- 06How do you share React between micro-frontends without loading it twice?
Lesson, 5 min read
- 08How does routing work in micro-frontends?
Lesson, 5 min read, then 5 questions to practise
- Implement a basic client-side router using the History API
- Build a route matcher with params, optional segments and wildcards, ranked by specificity
- Design deep links as a versioned API: URL state, schema migrations, sharing and SEO
- Restore scroll positions in a single-page app: save per history entry, restore on Back, reset on new navigation
- Build nested route loaders and actions: parallel loading, <Outlet>, pending UI, aborts and revalidation
- 10What belongs in a micro-frontend shell (host) app, and what should stay out?
Lesson, 6 min read, then 1 question to practise
- 11What is Module Federation?
Lesson, 6 min read, then 1 question to practise