Skip to content

lwc 301 inter comms

James Hou edited this page May 13, 2021 · 3 revisions

When designing for the flexipage, the first thing that stands out is that there is no common parent (apart from the flexipage itself) between all the custom LWCs you author on the page.

I've solved this in my other repo here:

https://github.com/tsalb/lwc-utils/wiki/Motivation#complex-component-communication-can-be-difficult-to-design-with-consistency

To summarize the benefits of using something like message-service, they are:

  • Consistency & Predictability.
  • Easy to understand design pattern.
  • Additional support for artificial boundaries.
    • For Lightning Service Console apps, scoping events to only the tab in front of your user.
  • Designed specifically for making Flexipage Composition a breeze.