- Setup and preparation.
- Create a reference to a Lightning Components app that includes dependency information about the components you intend to use.
- Create components on the page to build the page’s functionality.
Setup is more involved than with Lightning Components for Visualforce, because Lightning Out isn’t running inside a Salesforce container. You manually handle services that are provided automatically when running inside Salesforce. For example, your client code needs to explicitly manage authentication and session initialization, either with your own code or using a library such as ForceJS.
There’s also some setup within Salesforce to allow access to your Lightning Components app. You need to configure the remote site for CORS and create a Connected App with OAuth in Salesforce. This process is the same one that you follow for any for app that connects to Salesforce.
For more details and sample code, see the Lightning Components Developer Guide.