Skip to content

Commit 179242a

Browse files
committed
Add readme
1 parent 5331090 commit 179242a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
# module-federation-react-router-dom
1+
# Module Federation - React Router DOM Example
2+
This example shows how to handle indipendent and nested routings in a MFE setup based on [webpack-module-federation](https://github.com/module-federation). The setup consists of:
3+
4+
- `app1` & `app2`: apps using a browser history strategy when acting as hosts and an in-memory history strategy when acting as remotes.
5+
- `shell`: host app based on a browser history strategy that handles high-level routing. Shell routing determines mounting/unmounting of `app1` and `app2` remotes.
6+
7+
The shell is the only component responsible for updating browser url. The two level of history strategies (browser + in-memory) are kept in sync through an event-based communication between shell and remotes.
8+
9+
<br>
10+
11+
# Running Demo
12+
- Install deps by running `npm install` in each of the MFE root folder (i.e. `app1`, `app2`, `shell`).
13+
- Start apps by running `npm start` in each of the MFE root folder.
14+
15+
<br>
16+
17+
# Credits
18+
The setup is inspired to https://github.com/StephenGrider/mfe.

0 commit comments

Comments
 (0)