0

I need to communicate between shell and remote in my microfrontend application (with module federation) Everything is ok using CustomEvent when the remote communicate to the shell, the problem is when the shell need to comunicate to the remote that could be not istantiated when the message is dispatched. How to detect that and begin the communication only when the remote comes up?

Marco24690
  • 305
  • 1
  • 4
  • 23

1 Answers1

0

sounds like some piece of state should be shareable between host and remote. this way you could update the state from the shell, and then read the result from the remote at any point of time.

to make that work just use your favourite redux state management solution, their behavior is very simillar and should work whatever you choose,

Andrei
  • 10,117
  • 13
  • 21