This article discusses different techniques for sharing states between React micro-frontends using Module-Federation. It covers the challenges of state sharing, as well as techniques such as custom events, message bus, props, and platform storage APIs. The Message Bus technique is explained in detail, highlighting its use of a centralized messaging system to publish and subscribe to events for seamless data flow across components.
Table of contents
Technique 01: Custom Events for State Sharing in Micro-FrontendsTechnique 02: Message Bus for State Sharing in Micro-FrontendsTechnique 03: State Sharing through Props in Micro-Frontends StateTechnique 04: Platform Storage APIs for State Sharing in Micro-Frontends1 Comment
Sort: