home / skills / harborgrid-justin / lexiflow-premium / micro-frontend-federation
/frontend/.github-skills/micro-frontend-federation
This skill helps orchestrate distributed React applications using Module Federation and shared contexts, enabling seamless remotes, synchronized state, and
npx playbooks add skill harborgrid-justin/lexiflow-premium --skill micro-frontend-federationReview the files below or copy the command above to add this skill to your agents.
---
name: micro-frontend-federation
description: Orchestrate distributed React applications using Module Federation and shared context bridges.
---
# Micro-Frontend Federation (React 18)
## Summary
Orchestrate distributed React applications using Module Federation and shared context bridges.
## Key Capabilities
- Share React Context across federation boundaries.
- Manage version skew in shared dependencies at runtime.
- Isolate styling and event propagation between remote modules.
## PhD-Level Challenges
- Design a fault-tolerant loading strategy for failing remotes.
- Prove type-safety across dynamic module boundaries.
- Analyze memory overhead of duplicate dependency loading.
## Acceptance Criteria
- Deploy a host app with seamlessly integrated remotes.
- Demonstrate shared state synchronization.
- Document the dependency sharing policy.
This skill helps orchestrate distributed React applications using Module Federation and shared context bridges. It focuses on sharing React Context across remote boundaries, managing runtime dependency version skew, and isolating styling and event propagation. The outcome is a predictable, integratable micro-frontend platform for complex web apps.
The skill wires a host application to load remote React modules via Module Federation and establishes a lightweight context bridge to propagate React Context values across those boundaries. It inspects shared dependency metadata at runtime and applies a policy to decide whether to reuse host versions or fall back to remote bundles. It also includes isolation strategies for CSS and DOM events to prevent cross-remote leakage.
How does the context bridge affect performance?
The bridge passes references and subscriptions, minimizing re-renders; measure update frequency and memoize selectors to keep overhead low.
What if a remote uses a different React version?
Apply a version policy: prefer host singleton for core libs or load the remote in an isolated boundary and use an adapter to translate APIs when necessary.