• Public
  • Public/Protected
  • All

Module app

Entrypoint for SDK that should be used within application bundle. It works well with server and client side rendering.

Client side

At client side your app receives instance of the IlcAppSdk via props that are passed to it's lifecycle functions (LifeCycles). So everything is pretty simple here :) Typings can be loaded in the following way:

import IlcAppSdk from 'ilc-sdk/app';

Server side

Unfortunately during app's SSR we don't have ILC in place. So we need to use result of the IlcSdk.processRequest (which implements AppSdkAdapter) to receive all the necessary data for IlcAppSdk initialization.

const IlcSdk = require('ilc-sdk').default;
const IlcAppSdk = require('ilc-sdk/app').default;

const ReactDOMServer = require('react-dom/server');
const {default: App} = require('./build/server');

server.get('*', (req, res) => {
    const ilcReqData = ilcSdk.processRequest(req);
    const appSdk = new IlcAppSdk(ilcReqData);

    const html = ReactDOMServer.renderToString(App(appSdk));



Type aliases


ErrorHandler: (error: Error, errorInfo?: Record<string, any>) => void

Allows to handle uncaught app/parcel errors. For apps it will be passed by ILC and handled centrally. For parcels it may be passed by Parcel component and handled there.

Type declaration

    • (error: Error, errorInfo?: Record<string, any>): void
    • Parameters

      • error: Error
      • Optional errorInfo: Record<string, any>

      Returns void


MountParcel: <ExtraProps>(parcelConfig: ParcelConfig<ExtraProps>, customProps: ParcelMountProps & ExtraProps) => ParcelObject<ExtraProps>

Type declaration


ParcelConfig<ExtraProps>: LifeCycles<ParcelLifecycleFnProps<ExtraProps>> | (() => Promise<LifeCycles<ParcelLifecycleFnProps<ExtraProps>>>)

Type parameters

  • ExtraProps


ParcelLifecycleFnProps<ExtraProps, RegProps>: ExtraProps & ParcelMountProps & ParcelLifecycleFnPropsSystem<RegProps>

Describes all properties that are passed by ILC & single-spa to the application lifecycle Fns

Type parameters

  • ExtraProps

  • RegProps

Generated using TypeDoc