Exposing components with Lightning Out
Lightning Out is a JavaScript library that can be imported into regular HTML pages, such as Visualforce pages, and other websites or other containers, such as Google Apps. Once imported, it exposes an API that allows the page developer to instantiate a Lightning component and inject it into a given HTML element on that page. The host page must provide a Salesforce session or OAuth token to allow this to happen in a secure way. At the time of writing, this feature is in Beta; you can read more about it at https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lightning_out.
The process of using Lightning Out for Visualforce pages is simplified through the use of the apex:includeLightning
component on the page, which loads the JavaScript library and handles authentication. Call the $Lightning.use
global method to begin the bootstrapping process to load the component into the page.
Using Lightning components...