Understanding the component life cycle
The framework invokes different methods described in the previous section at different life cycle stages, and it is crucial to know when these methods will be invoked and how they interact with the host. The host here can be either model-driven or a canvas app, which will contain the component.
Page load
When the page loads, the component invokes the constructor defined in the manifest file. This will create an object for the application to use. When the page is ready, it initializes the component by calling the init() method with a set of parameters:
init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement)
Data changes by the user
When the page loads, the component displays the data until the user interacts with the component to change the data. Once this occurs, you must call the notifyOutputChanged...