Child-to-Parent Communication in LWC – A Complete Guide (Part 1)

By | November 26, 2025

In Lightning Web Components (LWC), components often need to communicate with each other. While parent-to-child communication is straightforward, child-to-parent communication works through Custom Events. This approach is essential when a child component needs to send data or trigger logic in the parent.

What is Child-to-Parent Communication?

It allows a child LWC to:

● Send data to the parent
● Notify the parent about user actions
● Trigger logic inside the parent component

This communication relies on Custom Events.

How Custom Events Work?

  • Child fires the event

this.dispatchEvent(
new CustomEvent(‘valuechange’, {
detail: { value: selectedValue }
})
);

  • Parent listens to the event

<c-child-component onvaluechange={handleValueChange}></c-child-component>

  • Parent handles it

handleValueChange(event) {
this.selectedValue = event.detail.value;
}

Example Scenario

A child component sends the selected value from a dropdown to the parent component.
The parent receives this value and displays it in the UI.

Step-by-Step Implementation

Child Component

Child.html
Child.html
Child.js
Child.js

Parent Component

Parent.html
Parent.html
Parent.js
Parent.js

Understanding the Event Flow

● Child fires a custom event → valuechange
● Parent listens using:
onvaluechange={handleValueChange}
● Parent receives the data through event.detail
● UI updates automatically using the reactive property selectedValue

Custom events provide a clean and powerful way for child components to communicate back to parent components. This ensures reusable components and a well-structured architecture.

Conclusion

Child-to-parent communication in LWC becomes simple with custom events. By following these steps, you can easily send data from a child component to a parent and build clean, modular Lightning components.

In Part 2, we will cover Parent-to-Child communication.

By following the above blog instructions, you will be able to learn Child-to-Parent Communication in LWC – A Complete Guide (Part 1). If you still have queries or any related problems, don’t hesitate to contact us at salesforce@greytrix.com. More details about our integration product are available on our website and Salesforce AppExchange.

We hope you may find this blog resourceful and helpful. However, if you still have concerns and need more help, please contact us at salesforce@greytrix.com.

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partner and a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners and Sage PSG across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.

Greytrix has some unique solutions for Cloud CRM such as Salesforce Sage integration for Sage X3, Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data Migration, Integrated App development, Custom App development and Technical Support business partners and end users. Salesforce Cloud CRM integration offered by Greytrix works with Lightning web components and supports standard opportunity workflow. Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star rated app listed on Salesforce AppExchange.
The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more information on our Salesforce products and services, contact us at salesforce@greytrix.com. We will be glad to assist you.

Related Posts