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 likeif: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.
