title: How to share redux store in micro frontend architecture?
body: <p>I am trying to create a small project to implement micro-frontend architecture following <a href="https://martinfowler.com/articles/micro-frontends.html" rel="noreferrer">Micro Frontends</a> article. I am creating multiple repositories for each MFE(Micro frontend) and also using Redux for the application. I have the following architecture:</p>
  <ol>
  <li><code>Frame</code> - A centralised(main) repo that is responsible for rendering the main application part and MFEs based on routing(I am using <code>connected-react-router</code>). It initialises the Redux store and also adds an <code>injectReducer</code> function to dynamically add reducers as explained in <a href="https://redux.js.org/recipes/code-splitting#defining-an-injectreducer-function" rel="noreferrer">code splitting in redux</a> docs. The frame fetches the manifest for particular MFE and renders it. The frame also has some redux data for authentication purpose.</li>
  <li><code>MFEs</code> - These are the individual feature-wise application and are rendered by frame.</li>
  </ol>
  <p>Now I have a problem that I want to use <code>injectReducer</code> function into my MFEs to dynamically add reducers to store. For this, I need access to the same <code>store</code> instance that is created by frame.
  As mentioned in <a href="https://stackoverflow.com/questions/38460949/what-is-the-best-way-to-access-redux-store-outside-a-react-component">this answer</a>, the ideal way is to export the created store instance and use it but how we can share the same instance of the store across multiple repos?</p>