Code Monkey home page Code Monkey logo

shared-redux-state-into-micro-frontends's Introduction

Sharing redux state between micro frontends

This is a bare minimum code demonstration of micro front ends using Webpack's ModuleFederationPlugin. It showcases how to create micro front ends and share a Redux state between applications.

Table of Contents

Installation

Before getting started, ensure you have Node.js and npm installed.

npm run install

This command installs dependencies for the host, store, and nav applications.

  • npm run install:host: Install host application dependencies.
  • npm run install:store: Install store application dependencies.
  • npm run install:nav: Install nav application dependencies.

Usage

To run the applications in development mode:

npm start

This command starts the applications in parallel.

  • npm run start:host: Start the host application.
  • npm run start:store: Start the store application.
  • npm run start:nav: Start the nav application.

Visit http://localhost:3000 to view the micro front ends in action.

Development

During development, you can run each application separately:

npm run start:host npm run start:store npm run start:nav

This allows you to work on individual micro front ends independently.

Build

When ready to build for production:

npm run build

This command builds the applications in parallel.

  • npm run build:host: Build the host application.
  • npm run build:store: Build the store application.
  • npm run build:nav: Build the nav application.

The production-ready files will be generated in the respective build folders.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

  1. Fork the repository.
  2. Create your feature branch: git checkout -b feature/your-feature.
  3. Commit your changes: git commit -am 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature.
  5. Open a pull request.

License

This project is licensed under the MIT License.

shared-redux-state-into-micro-frontends's People

Contributors

amitpatil321 avatar

Watchers

 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.