0

I decided to refactor our monolith frontend application. I read a lot of articles about micro frontends and mono repo approach. Decided to merge these two architectural approaches and use both.

I will have applications folder with all microfrontend sub applications ( separated projects ). They will be built separately, after build they will be bundled as one unit (for web components);

I heard a lot that it is not recommended to have code sharing, but i decided to have libs folder and put there everything needed into sub applications.

So as soon as i finish this folder structure with NX, i am going to build my own bootstraper or orchestrator. all builds will be loaded as web components, because they provide a lot of benefits. I am forced to write my own routing for orchestrator to be able to load corresponding web components according to route.

But, there is one big challenge. I need communication between sub applications. for example, if in header app i click to the username, i want to load popup into another micro app. so i want to have communication like Ngrx, Reduxs... but they store their current state into memory, therefore they are accessible only inside specific scope.

Do you have any idea or experience how to force libraries like ngrx and redux to work browser level ? I want to dispach event which will be available into another sub application. I found one approach where redux work on localstorage. Any other ideas ?

1 Answers1

1

May be you can have a look at the following library.

Independent MicroFront ends using single spa library

Rahul Tokase
  • 1,048
  • 9
  • 25