Static getWill return names of all registered shared libraries in ILC-Registry
const sharedLibNames = await ILC.getAllSharedLibNames();
Static mountWill create and mount a single-spa parcel. See details here.
const parcel = ILC.mountRootParcel(() => ILC.importParcelFromApp('@portal/people', 'person'), {
prop1: 'value1',
domElement: document.getElementById('a-div'),
});
Static getStatic getReturns the A/B experiment assignments ILC resolved for the current page, e.g. { 'homepage-hero': 'variant-b' }.
It is the same map ILC passes to route apps as appProps.experiments, so apps that ILC does not mount
for a route (embedded apps, parcels, wrapper apps) render the same variant as the rest of the page.
The map is frozen and changes only on the next full page load; {} means the visitor has no assignments.
Returns undefined outside ILC, or when the running ILC version does not provide the assignments yet.
const variant = GlobalBrowserApi.getExperiments()?.['homepage-hero'];
Static importAllows to fetch Parcel from the application and inject it with ILC specific configuration.
import Parcel from 'single-spa-react/parcel';
<Parcel
config={() => ILC.importParcelFromApp('@portal/people', 'person')}
wrapWith="div"
prop1="value1"
/>
Static isStatic loadOptional options: { Optional injectStatic navigateCan be used for programmatic route change at simple apps. Localization of the URL will be done automatically.
Static unloadGenerated using TypeDoc
ILC exposes some utility APIs globally at
window.ILC. Here we provide convenience typings to use with typescript.Example