~

All ways to communicate between lightning components (Aura and LWC).

Explains all different ways to communicate between lightning components (LWC, Aura) and visualforce with code samples.

All ways to communicate between lightning components (Aura and LWC)

There are a lot of different ways to communicate between different types of lightning components (lwc to lwc, lwc to aura, aura to lwc etc). In this blog we will cover all different ways of communicating between different types of lwc and aura components.

Communication patterns between Lightning components

From a parent component to child component you can just pass data through attributes without any events. sample code

A CustomEvent needs to be fired from child lwc component and a listner needs to be added in parent component to send data from a child lwc component to it's parent lwc component sample code

pubsub library provided by Salesforce is one approach to do this. sample code

aurapubsub library provided by Salesforce is one approach to do this. sample code

  • LWC child component to aura parent component [COMING SOON]

  • Aura parent component to LWC child component [COMING SOON]

  • Aura stand alone component to LWC stand alone component [COMING SOON]

  • Lighting message service

Interactions with Visualforce Page

Still some features like PDF rendering are only supported in Visualforce. There is a chance you might need to interact between lightning components and visualforce components. Some examples are listed below,

  • Embedding visualforce page inside aura [COMING SOON]
  • Embedding aura app inside visualforce [COMING SOON]
  • Embedding visualforce page inside lwc [COMING SOON]
  • Embedding lwc inside visualforce page [COMING SOON]

[Top]

Comments

    No comments yet. Be the first to share your thoughts!

Phone

Office: +1 725 333 6699

Email

Office: admin@appcolab.com

Site: https://appcolab.com

Social
©2024 AppColab LLC · All rights reserved.