Courseiva
User InterfacehardMultiple ChoiceObjective-mapped

SALESFORCE-PD1 User Interface Practice Question

A developer needs to pass data from a child Lightning Web Component to a parent Lightning Web Component up the component hierarchy. What is the standard mechanism to achieve this?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Dispatch a CustomEvent in the child and handle it in the parent's template using an event listener directive.

Child-to-parent communication in LWC is achieved by dispatching a custom event using CustomEvent and listening to it in the parent template.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use the @api decorator in the child component to expose a public method that the parent can call directly.

    Why it's wrong here

    Incorrect because @api exposed properties go from parent to child, not child to parent.

  • Dispatch a CustomEvent in the child and handle it in the parent's template using an event listener directive.

    Why this is correct

    Correct because CustomEvent is the standard mechanism for child-to-parent communication.

  • Publish a message using the Lightning Message Service from the child and subscribe in the parent.

    Why it's wrong here

    Incorrect because LMS is meant for components that may not share a direct hierarchical relationship, whereas direct events are standard for parent-child.

  • Mutate a shared global reactive property imported from a common utility JavaScript module.

    Why it's wrong here

    Incorrect because mutating shared global state breaks unidirectional data flow best practices.

About these practice questions

This SALESFORCE-PD1 question is part of Courseiva's 493-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Salesforce exam blueprint

This SALESFORCE-PD1 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SALESFORCE-PD1 exam.