Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Salesforce Developer
easy

What is a Lightning Web Component, technically?

An LWC is a UI component built on the Web Components standard — Custom Elements, Shadow DOM, ES Modules — running inside the Lightning runtime.

Anatomy of an LWC bundle:

  • .html — template with directives like if:true, for:each.
  • .js — JavaScript class extending LightningElement, with decorators (@api, @track, @wire).
  • .css — scoped styles via Shadow DOM.
  • .js-meta.xml — config: which contexts the component appears in, target object types.

Apex integration via @AuraEnabled(cacheable=true) methods; LWC imports them and binds via @wire. Lightning Data Service (LDS) offers cached record access without writing Apex.

Comparison with React/Vue: closer to native (no virtual DOM in the same way); templates are HTML, not JSX; decorators replace hooks for reactivity. Same architectural feel: components, props, events, parent-child composition.

Why this answer works

Tests LWC depth. Naming the bundle structure, the decorator set, and the LDS option distinguishes a real LWC developer.

Follow-ups to expect

Related dictionary terms