Lightning Out Considerations and Limitations
Creating an app using Lightning Out 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 apps run outside of any Salesforce container, there are things you need to keep in mind, and possibly address.
- Browser Support
Lightning Out supports the same browsers as Lightning Experience. This support means that your Lightning Out 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 either.
Lightning Out doesn’t benefit from many of the caching capabilities of Lightning Experience so startup and performance are usually slower.
- Browser Third-Party Cookies
Lightning components set cookies in a user’s browser. Since Lightning Out runs Lightning components outside of Salesforce, these cookies are “third-party” cookies. To enable Lightning Out apps to work with third-party cookies, see Lightning Out Requirements.
There’s no Salesforce container to handle authentication for you, so you have to handle it yourself. This essential topic is discussed in detail in Authentication from Lightning Out.
While the core Lightning Out 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, and Lightning Web Components for Visualforce, which is based on Lightning Out. This limitation is because the components depend on resources available in the
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 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.