@tayelemma/single-spa-alpha
v1.0.1
Published
Creates lifecycle function when registering a single-spa mfe by combining singel-spa-react and single-spa-css
Readme
Single-spa-alpha
This combines the single-spa lifecycle hooks (bootstrap, mount, and unmount) from single-spa-react and
single-spa-css into one easy to use libraryl.
How To Use
In your mfe's main file... export the lifecyle hooks from single-spa-alpha like this...
import React from 'react';
import ReactDOM from 'react-dom';
import singleSpaAlpha from '@tlapps/single-spa-alpha';
import Root from './components/Root';
const lifecycles = singleSpaAlpha({
React,
ReactDOM,
rootComponent: Root,
errorBoundary(err, info, props){
console.log(err, info, props);
return <></>;
},
});
export const {bootstrap, mount unmount } = lifecycles;