Lightning Out (Beta) Considerations and Limitations
We recommend using Lightning Out 2.0 instead of Lightning Out (beta). Lightning Out 2.0 is a new generally available feature that completely replaces–and isn’t an extension of–Lightning Out (beta), which is still subject to Beta Service Terms. See How Lightning Out 2.0 Compares to Lightning Out (Beta).
Creating an app using Lightning Out (beta) is generally like creating any app with Lightning web components. However, because your components are running outside of Salesforce, there are a few issues you want to be aware of.
The issues you must be aware of can be divided into two categories.
Because Lightning Out (beta) apps run outside of any Salesforce container, there are things you need to keep in mind, and possibly address.
- Browser Support
Lightning Out (beta) supports the same browsers as Lightning Experience. This support means that your Lightning Out (beta) app and components load in those browsers. However, if a component or functionality doesn't support a particular browser, the component or functionality doesn't work in Lightning Out (beta) either.
- Browser Third-Party Cookies
Lightning components set cookies in a user’s browser. Since Lightning Out (beta) runs Lightning components outside of Salesforce, these cookies are “third-party” cookies. To enable Lightning Out (beta) apps to work with third-party cookies, see Lightning Out (Beta) Requirements.
- Authentication
To handle authentication, you must manually provide a Salesforce session ID or authentication token when you initialize the Lightning Out (beta) app. See Authentication from Lightning Out (Beta).
While the core Lightning Out (beta) functionality is stable and complete, there are a few interactions with other Salesforce features that we’re still working on.
Chief among these features is the standard components built into the Lightning Component framework. Many standard components don’t behave correctly when used in a standalone context, such as Lightning Out (beta), and Lightning Web Components for Visualforce, which is based on Lightning Out (beta). This limitation is because the components depend on resources available in the one.app
container.
To avoid this issue with your own components, make their dependencies explicit. Use @salesforce/resourceUrl
to reference all required static resources that aren’t embedded in the component itself.
If you’re using standard components in your apps, they might not be fully styled, or behave as documented, when they’re used in Lightning Out (beta) or Lightning Web Components for Visualforce.
The Component Reference in the Component Library has an Experiences field for each component that lists the supported containers for the component.
See Also