A React adapter for Ragu Server - A micro-frontend framework.
yarn install ragu-cli
yarn install ragu-react-server-adapter
Create a file that exposes a single function that returns your component:
# my-mfe.jsx
export default () => <MyReactComponent />
After, start the ragu server using the cli:
yarn ragu-cli dev --file my-mfe.jsx
Open your browser at http://localhost:3100/preview to check your micro-frontend live!
That's all!
yarn ragu-cli static --file my-mfe.jsx --baseurl https://mycdnhost/mymfe --output production
It will create a directory called production
with a file called index.json
.
import {RaguComponent} from "ragu-client-react";
<RaguComponent src="https://mycdnhost/mymfe/index.json" />
Check The docs for More: https://ragu-framework.github.io/#!/ragu-react-server-adapter