Communication between LWC components
Today, we will see how to communicate between the LWC components. We will cover parent to child component communication and vice versa. We will see the various ways in which we can communicate between aura components and then we will compare it with the ways available to communicate between LWC components. A side by side comparison will help to have a better understanding of how things work in LWC. Aura Components LWC Communication from the parent component to the child component 1. Passing attributes: We can pass attribute from parent component to child component. The binding between attributes can be one-way binding or two-way binding. 1. Public property: Creating a public property in the child component and passing the value from the parent component. Public property is reactive in nature. 2. Aura method: Define an aura method in the child component and call it from the parent component. Aura methods cannot return a value. 2. Public method: Create a public m...