1.0.1 • Published 12 months ago

@swain-test/micro-ui v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

A tiny framework for building micro frontend apps using React.

The source code has zero dependencies, and is less than 100 lines of code.

Micro Frontends

To understand the micro-frontend architecture pattern in general, read this article.

Terms

We'll use these terms to talk about the various components of a micro-frotend system:

  • container app - this is a "shell" SPA that loads + renders many micro-frontends. Think of it as "a nav bar + a micro-frontend loader".

  • child app - a smaller SPA that is loaded by a container app

The Rules

This framework requires that you stick to a few key rules:

  1. Everything is React. We don't support multiple frameworks.

  2. A "deployed" child app should consist of a single JavaScript bundle, and a single JSON manifest file (child apps should not ship raw CSS or HTML). Manifest files look like this:

{
  "name": "my-child-app",
  "version": "1.0.0",
  "bundle": "https://my-child-app.com/index.js"
}
  1. Child apps should not include react or react-dom in their deployed bundles, and should instead rely on the container app to provide these dependencies via window.React and window.ReactDOM.
1.0.1

12 months ago

1.0.0

12 months ago