@entur-partner/micro-frontend
v2.4.4
Published
This package contains micro-frontend components for Entur partner
Downloads
1,591
Keywords
Readme
Entur partner micro-frontend components
This package contains micro-frontend components for Entur partner
Installation
npm install @entur-partner/micro-frontend
# or if you are using Yarn:
yarn add @entur-partner/micro-frontend
Usage
Register a micro frontend
React:
registerMicroFrontend({
microFrontendId: 'PermissionAdmin',
mount: (containerId, payload) => {
ReactDOM.render(<App {...payload} />, document.getElementById(containerId));
},
unmount: (containerId) => {
ReactDOM.unmountComponentAtNode(document.getElementById(containerId));
},
});