Valid PDII Dumps shared by EduDump.com for Helping Passing PDII Exam! EduDump.com now offer the newest PDII exam dumps, the EduDump.com PDII exam questions have been updated and answers have been corrected get the newest EduDump.com PDII dumps with Test Engine here:
A developer is building a Lightning web component that searches for Contacts. The component must communicate the search results to other unrelated Lightning web components, that are in different DOM trees, when the search completes. What should the developer do to implement the communication?
Correct Answer: D
For communication between unrelated Lightning web components that are in different DOM trees, the most suitable approach is to use the Lightning Message Service (LMS). This service allows components to communicate with each other using a message channel, which is particularly useful when the components are not in the same containment hierarchy. By publishing and subscribing to messages on a message channel, components can exchange data and notifications, which is ideal for the scenario described. References: Lightning Web Components Developer Guide - Communicate Across the DOM with Lightning Message Service