nerdexam
SalesforceSalesforce

PDI · Question #23

PDI Question #23: Real Exam Question with Answer & Explanation

The correct answer is D: Create a custom event.. Child Lightning Web Components communicate with parent components by dispatching custom events, which the parent then listens for and handles.

Submitted by brentm· Apr 18, 2026User Interface

Question

A developer is creating an app that contains multiple Lightning web components. One of the child components is used for navigation purposes. When a user click a button called.. component, the parent component must be alerted so it can navigate to the next page. How should this be accomplished?

Options

  • AFire a notification.
  • BUpdate a property on the parent.
  • CCall a method in the Apex controller.
  • DCreate a custom event.

Explanation

Child Lightning Web Components communicate with parent components by dispatching custom events, which the parent then listens for and handles.

Common mistakes.

  • A. Firing a notification typically refers to showing a toast message to the user, not a direct programmatic communication channel between two components for internal application logic.
  • B. Child components cannot directly update properties on a parent component; properties flow unidirectionally from parent to child in Lightning Web Components.
  • C. Calling a method in the Apex controller handles server-side operations and database interactions, but it does not facilitate direct communication between client-side Lightning web components.

Concept tested. LWC Child-to-Parent Communication

Reference. https://developer.salesforce.com/docs/component-library.en-us.lwc.meta/lwc/lwc_events_create_dispatch.htm

Topics

#Lightning Web Components#Custom Events#Child-to-Parent Communication#Inter-component Communication

Community Discussion

No community discussion yet for this question.

Full PDI PracticeBrowse All PDI Questions