22. How can we use Lightning Web Components outside Salesforce, and how does authentication work?
Since Winter ’26, the recommended way to do this is Lightning Out 2.0, which replaced the original Lightning Out (Beta) entirely. Key points that matter for an interview:
- Lightning Out 2.0 is built on Lightning Web Runtime (LWR) and only supports embedding custom LWC (not Aura components, and not standard base components directly — those need to be wrapped in a custom LWC first).
- Authentication is the biggest change. The original Lightning Out (Beta) relied on fragile session-ID-based authentication passed to the host page. Lightning Out 2.0 instead uses OAuth 2.0 together with the UI Bridge API: the external app requests authorization from Salesforce, receives a token, and exchanges it for a temporary secure Frontdoor URL used to render the embedded component.
- Embedded components render inside iframes with a shadow DOM for stronger isolation than the original beta offered, which ran components directly on the host page without that separation.
- You can override styles and properties of the embedded component and communicate between the component and the external app using app events.
- Known limitations (as of GA): only custom LWC is supported (no Aura, no direct standard/base components), authenticated access is required (no public/anonymous embedding yet), and the external app’s browser must allow third-party/cross-origin cookies for the Salesforce session.
For validation-style interview questions on this topic, the key thing candidates should articulate is why the OAuth-based model is more secure than the old session-based one — it avoids exposing long-lived session identifiers to the host page and scopes access through short-lived, purpose-specific tokens instead.
23. Is it possible to iterate a Map in Lightning Web Components?
There’s no native out-of-the-box support for iterating a Map directly in an LWC template. The common workaround is converting the Map’s entries into an array of key-value pair objects in your JavaScript controller (for example, using Array.from(myMap) or a custom transformation), and then iterating that array with for:each in the template.
24. How do we iterate an sObject list in Lightning Web Components?
There’s no native out-of-the-box support for rendering a generic sObject’s fields dynamically. The typical approach is to query the object’s describe information (via getObjectInfo / getPicklistValues wire adapters or an Apex helper) to get field metadata, then dynamically build a list of field-value pairs in JavaScript that the template can iterate with for:each.
25. How do we access labels in Lightning Web Components?
import labelName from '@salesforce/label/labelReference';Custom labels imported this way are automatically available for use in your JavaScript controller and can be exposed to the template through a getter.
26. What is the Lightning Message Service?
Lightning Message Service (LMS) is a publish-subscribe messaging system that enables communication across the DOM between components that aren’t in a direct parent-child relationship — including Visualforce pages, Aura components, and Lightning Web Components. Components publish messages to a shared message channel, and any component subscribed to that channel receives the message, regardless of where it sits in the page hierarchy.
27. How do we access events in Lightning Web Components?
Components communicate up the hierarchy (child to parent) by dispatching a CustomEvent. The parent listens for that event using the standard on + event name syntax in its template.
// child.js
this.dispatchEvent(new CustomEvent('itemselected', { detail: this.itemId }));<!-- parent.html -->
<c-child onitemselected={handleItemSelected}></c-child>28. Where can you use/access Lightning Web Components in Salesforce?
We can use LWC in Flow, Lightning App Builder (Record, App, and Home pages), Lightning Communities (Experience Cloud), the Utility Bar, a standalone Aura app, Custom Tabs, Visualforce, and — as of Winter ’26 — as local actions in screen flows, and outside Salesforce entirely via Lightning Out 2.0.
29. Explain styling hooks for Lightning Web Components, and how they relate to design tokens.
Styling hooks are now Salesforce’s primary recommended approach for customizing the default appearance of LWC-based Base Components (like lightning-button or lightning-card), rather than custom Aura design tokens. Styling hooks are CSS custom properties exposed specifically for supported customization, so your overrides won’t silently break when Salesforce updates a base component’s internal markup — unlike unsupported selector overrides.
Since Winter ’24, Salesforce specifically recommends global color styling hooks over custom Aura tokens for new development, largely to align with WCAG 2.1 color contrast standards. With SLDS 2.0 (generally available as of Winter ’26), styling hooks are also the approach that stays compatible going forward, since some older token variable syntax doesn’t carry over cleanly to SLDS 2.
30. What are Aura Tokens, and are they still relevant in 2026?
Design Tokens are named entities that store visual design attributes, used in place of hard-coded values (like hex colors or pixel spacing) to keep a design system scalable and consistent.
They still work and are still supported, but as of 2026 they’re considered the legacy approach — Salesforce recommends styling hooks (Question 29) for new components. Aura tokens remain relevant mainly for maintaining older components or for the small set of use cases styling hooks don’t yet cover.
To create a tokens bundle: in the Developer Console, select File → New → Lightning Tokens. The first tokens bundle should be named defaultTokens; tokens defined within it are automatically accessible in your Lightning components, while tokens in any other bundle require importing into defaultTokens to be accessible.
<aura:tokens>
<aura:token name="myBodyTextFontFace"
value="'Salesforce Sans', Helvetica, Arial, sans-serif"/>
<aura:token name="myBodyTextFontWeight" value="normal"/>
<aura:token name="myBackgroundColor" value="#f4f6f9"/>
<aura:token name="myDefaultMargin" value="6px"/>
</aura:tokens>31. How can you use Aura Tokens and SLDS Design Tokens in LWC?
To use a custom Aura Token in LWC, reference it as a CSS custom property in your stylesheet:
/* myLightningWebComponent.css */
color: var(--c-myBackgroundColor);LWC can also use any Lightning Design System design token marked with Global Access:
/* myLightningWebComponent.css */
div {
margin-right: var(--lwc-spacingSmall);
}Note: this --lwc- camelCase syntax works in SLDS 1 but doesn’t carry over the same way in SLDS 2 (GA Winter ’26) — if you’re building or migrating components on SLDS 2, use the equivalent global styling hook instead of the older token variable syntax.
32. What are the notable LWC platform updates from 2025–2026 that a developer should know about?
A few recent changes are increasingly likely to come up in interviews, since they’ve shipped across Winter ’26 and Spring ’26:
- Lightning Out 2.0 (see Question 22) — the new OAuth-based way to embed LWC in external apps, GA as of Winter ’26.
lightning/graphqlmodule — a new GraphQL wire adapter module that supersedes the olderlightning/uiGraphQLApi, adding support for dynamic queries built with JavaScript string interpolation inside thegqltagged template literal.- GraphQL mutations — Spring ’26 added an
executeMutationfunction tolightning/graphql, allowing imperative create/update/delete operations directly through GraphQL instead of routing every write through Apex orlightning/uiRecordApi. - TypeScript support — still in developer preview, not GA, as of Spring ’26. The
@salesforce/lightning-typesnpm package now provides official type definitions for base components (replacing custom type-definition files developers previously wrote themselves), and Salesforce DX’s MCP server includes a tool to help convert existing JS-based LWC to TypeScript. - Local Dev (Beta) — a local component preview that, as of Winter ’26, supports platform modules like Lightning Data Service wire adapters,
@salesforcescoped modules, and Apex controllers, making local iteration faster without a full deploy cycle.
A well-prepared 2026 candidate should be able to name at least Lightning Out 2.0 and Lightning Web Security, since both directly touch security and authentication — the areas most likely to come up in a technical or architecture-focused interview round.