Posts

Showing posts from August, 2024

Lightning Web Component (LWC ) Notes Salesforce

Lightning Web Components (LWC) Notes Lightning Web Component (LWC) Notes Date: 09/03/20XX 1. Component Structure and Creation HTML File: All LWC HTML files must include the <template> tag. This tag contains the HTML that defines the structure of your component. Only one root <template> tag is allowed. Naming Conventions: Component Bundle Name: Must be in camelCase (e.g., myComponent ). Class Name in JS File: Should be in PascalCase (e.g., MyComponent ). JS File Requirements: import { LightningElement } from 'lwc'; export default class MyComponent extends LightningElement { // Your component logic here } Meta File (.xml): Purpose: Specifies the component’s metadata, including API version, target environments (e.g., App Page, Record Page), and accessibility (...