LWC Basics
LWC Basics
Component Basics
2. Data Binding
• Two-Way Data Binding: Binding component properties to the DOM and vice
versa (e.g., @track for reactive properties).
• One-Way Data Binding: Data flowing from parent to child components using
properties.
• @api: Exposing properties and methods for interaction with parent components.
• @wire: Fetching data from Salesforce services (e.g., Apex, Lightning Data
Service).
3. Component Lifecycle
• Lifecycle Hooks: Methods that run during different stages of the component's
lifecycle, such as constructor(), connectedCallback(), renderedCallback(), and
disconnectedCallback().
4. Events
• Event Handling: Dispatching and listening for events in parent and child
components.
5. Data Access
• Apex Integration: Using @wire and imperative calls to interact with Salesforce
Apex methods.
• Lightning Data Service (LDS): Simplified access to Salesforce objects for CRUD
operations.
• SOQL & SOSL: Writing and using Salesforce Object Query Language (SOQL) and
Salesforce Object Search Language (SOSL) to retrieve data.
6. Styling
7. Navigation
8. Testing
• Unit Testing with Jest: Writing and running tests for LWC components using Jest
framework.
• Mocking Data: Simulating data for tests using mock data and wire adapters.
• Test Coverage: Ensuring that your components are tested and meet required
code coverage thresholds.
• Salesforce CLI: Using Salesforce CLI for deploying LWC components and
managing metadata.
• App Page, Record Page, and Home Page: Understanding where to deploy and
use components in the Salesforce app.
• Public and Private Methods: Controlling access to methods via @api (public)
and regular methods (private).
• Lazy Loading: Loading components or data only when necessary to reduce the
initial load time.
• Reducing Apex Calls: Optimizing server calls and using caching strategies when
fetching data.
12. Security