Wrapper for applications⚓︎
This is an advanced feature of ILC. In most cases, you won't need it.
Application wrapper is useful when you want to extract some bootstrap, loading or authorization functionality from different applications, and control them from a single place.
For example, if you are building a store where product pages are developed by different teams. As a result, these pages will reside on different Micro Frontends. In this case, the business logic that checks whether the product has already been purchased by the customer can be extracted into a standalone application. This application would perform the check and render the corresponding UI for purchase, if necessary.
To use this feature, you need to configure the ILC Registry as follows:
- For the registered App Wrapper application, set the
- For the applications that you want to wrap with Wrapper, set
wrappedWithproperty according to the name of the application, registered in the previous step.
- You cannot use applications with
kind = wrapperin routes directly.
- If you need to wrap applications with SSR, make sure that the Wrapper (new or existing one) supports SSR as well. Otherwise, SSR support will be ignored for all wrapped applications.
Build App Wrapper⚓︎
Essentially App Wrapper is a regular ILC application that receives extra property to allow the rendering of the target application with additional properties when needed.
On the client-side, Wrapper App receives an additional
renderApp property via ILC to App interface
It exposes an additional
forwardRequest method that can be used to forward SSR request to the target application and render it
immediately on the client-side without executing App Wrapper's code during the initial CSR on page load.