Giter Site home page Giter Site logo

firstwhack / module-federation-mobx-example Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 2.0 1.13 MB

An example of simple shared state/data between micro-frontends

Home Page: https://githubbox.com/FirstWhack/Module-Federation-MobX-Example

TypeScript 50.37% HTML 1.38% JavaScript 45.38% Less 2.86%
react state-management reactjs mobx module-federation microfrontend-architecture

module-federation-mobx-example's Introduction

Sharing Observable State Across Micro-FrontEnds

Worlflows

main

Online IDE

This example runs in Code Sandbox!

Contents

App1

Runs at: http://localhost:1337

This app is acting as a host. It renders a table of Users within itself, below this rendering the contents of App2. The singleton Store is consumed as a Federated Module.

App2

Runs at: http://localhost:1338

This app functions stand-alone but is also consumed by App1 as a Federated Module. The singleton Store is consumed as a Federated Module.

Store

This is more of a library than an application. Using Module Federation Plugin we can share a singleton that both apps interact with.

In this example the store is based on TFRP using MobX - subscriptions are implicit, the store Class and singleton are exported (the store could be instantiated local to an app to avoid sharing)

module-federation-mobx-example's People

Contributors

firstwhack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.