Salesforce
PDII · Question #295
Which technique can run custom logic when a Lightning web component is loaded?
The correct answer is C. Use the connectedCallback() method. See the full explanation below for the reasoning.
Question
Which technique can run custom logic when a Lightning web component is loaded?
Options
- AUse an init event to call a function.
- BCall $A.enqueueAction and pass in the method to call.
- CUse the connectedCallback() method.
- DUse the renderedCallback() method.
How the community answered
(45 responses)- A11% (5)
- B7% (3)
- C78% (35)
- D4% (2)
Community Discussion
No community discussion yet for this question.