Salesforce Decode
Salesforcedecode
All topics

Learn LWC

Lightning Data Service, wire adapters, performance, and component communication.

98 questions in this topic

Difficulty Level

Topic Focus

Showing 15 of 98 LWC questions

Beginnerlwcbasicslightning

What is Lightning Web Components (LWC)?

Leadership wants a custom widget on the Account page. You explain why LWC is the modern choice.

Beginnerapitrackreactivity

What is the difference between @api and @track?

A parent passes a record Id to a child component. You explain public properties and reactivity.

Beginnereventscommunication

How do parent and child LWCs communicate?

A child picker selects an Account and the parent list must refresh. You explain communication patterns.

Beginnerldswireui-record-api

What is Lightning Data Service (LDS)?

You need Account Name on a component without writing Apex. You introduce LDS.

Beginnerwireadapters

What is @wire in LWC?

You load picklist values for an object field without Apex. You explain wire adapters.

Beginnerapeximperative

How do you call Apex from LWC?

On button click, you submit a form that creates a Case via server logic. You outline the pattern.

Beginnersldsbase-componentsui

What is SLDS and why use lightning-base components?

A developer builds custom HTML buttons that look wrong on Salesforce mobile. You point them to base components.

Beginnerdeploymenttestingjest

How do you deploy and test LWCs?

Your component works locally in VS Code but fails in sandbox. You describe LWC dev workflow basics.

BeginnerlifecycleconnectedCallback

What are lifecycle hooks in LWC?

You must load data when a component appears on a tab. You explain connectedCallback.

Beginnernavigationlightning-navigation

What is navigation in LWC?

After creating a record, you redirect user to the new record page. You mention NavigationMixin.

Beginnerformsvalidation

How does LWC handle forms and validation?

Users submit incomplete custom forms. You describe client-side validation approach.

Beginnerperformancebest-practices

What common LWC performance mistakes should beginners avoid?

A datatable component loads thousands of rows and freezes the browser. You list beginner performance tips.

Beginnerrecord-pickerlookup

Use lightning-record-picker for lookup replacement

Custom lookup LWC reimplements search poorly; users want recent records and advanced filter.

Beginnerbase-componentshtml

Compare LWC base components vs custom HTML elements

Developers build custom checkbox inputs inconsistent with Lightning Experience styling.

Beginnerimperativeperformancelds

Load imperative Apex on user action not connectedCallback for record pages

Every record page load fires five imperative Apex calls from connectedCallback even when user never opens tabs.