nerdexam
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)
  • A
    11% (5)
  • B
    7% (3)
  • C
    78% (35)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full PDII Practice