single-spa-inferno
Generic lifecycle hooks for Inferno applications that are registered as child applications of single-spa.
Quickstart
First, in the child application, run npm install --save single-spa-inferno
(or jspm install npm:single-spa-inferno
if your child application is managed by jspm). Then, in your child app's entry file, do the following:
;;; const infernoLifecycles = ; const bootstrap = infernoLifecyclesbootstrap; const mount = infernoLifecyclesmount; const unmount = infernoLifecyclesunmount;
Options
All options are passed to single-spa-inferno via the opts
parameter when calling singleSpaInferno(opts)
. The following options are available:
inferno
: (required) The main Inferno object, which is generally either exposed onto the window or is available viarequire('inferno')
orimport Inferno from 'inferno'
.createElement
: (required) The default export from Inferno'sinferno-create-element
package.rootComponent
: (required) The top level Inferno component which will be rendered.domElementGetter
: (required) A function that takes in no arguments and returns a DOMElement. This dom element is where the Inferno application will be bootstrapped, mounted, and unmounted.