Posts

Showing posts from September, 2021

Using Lightning Message Service aka LMS in LWC

Hey, Welcome Folks !! Let's talk about LMS.  Before going to LMS, lets understand little bit about Lightning Message Channel. Lightning Message Channel is a metadata that stores communication parameters or message. Use this message channel to publish/subscribe the message. Lightning Message Service is unique salesforce feature that allows developers to communicate across the DOM within a Lightning Page (i.e. unrelated components) , using a secure message channel. See the LMS as Application Events in aura framework that allows communication between the components on an application. Using LMS, we can communicate between Visualforce Pages embedded into lightning page, Aura Components, Lightning Web Components, Utility bar components. There are three main steps to use LMS into you web components: Creating a Lightning Message Channel. Publishing the message to Message Channel. Subscribe/Unsubscribe from Message Channel. Creating a Lightning Message Channel Create a folder under force:ap