Skip to content

RussellCanfield/mfe-shared-communication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microfrontends Shared Communication

This repo demonstrates some patterns for sharing state, or using event driven communication between Microfrontends. The examples include:

  • An event driven logger where the host owns the implementation and the remotes emit events back to the host
  • Sharing a redux store between the host and remotes - React context does not work out of the box, but can be made to work.
  • Sharing a custom store implementation between the host and remotes without an external dependency - useSyncExternalStore hook
  • Sharing react-query state between microfrontends using the same useSyncExternal hook

The examples above are not intended for production use. Further optimizations may be required to limit re-renders, etc.

About

Patterns for sharing state between microfrontends

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published