The best of TrailblazerDX 2022: Dynamic Interactions in LWC
The best of TrailblazerDX 2022: Dynamic Interactions in LWC
TrailblazerDX 2022 (formerly known as TrailheaDX) is a Salesforce event aimed at Salesforce Engineers, Architects and anyone else involved with the platform. Naturally, we at CaseNine keep a close eye on developments. During TrailblazerDX, one of the topics covered was Lightning Web Components (LWC). Theodoor van Donge, Lead Software Engineer at CaseNine, talks about Dynamic Interactions in LWC.
During TrailblazerDX, one of the topics discussed was LWC. There are three ways to communicate between Lightning Web Components: DOM events, Lightning Message Service (LMS) and Dynamic Interactions (DI). Dynamic Interactions will be available in the Spring '22 Release.
Key highlights of TrailblazerDX 2022
There are several highlights to report about LWC. Below we have listed the three main ones.
#1 Communication between LWC via Lightning App Builder
Event communication between LWC via the Lightning App Builder. Admins can now also use Dynamic Interactions to make Lightning Web Components dynamic. When a button in an LWC component is pressed, you can now have this event trigger a response in another component.
#2 Dynamic Interaction Event
When you get started developing LWC components, you can declare the definition of the Dynamic Interaction Event. An example is shown below.
Example: js-meta.xml configuration file for a source component Account List. It contains an itemselected event and the schema contains apiName and recordId as defined in the .js file(source).
#3 Updating LWC components.
Developers can now use Dynamic Interactions to update LWC components from updates/events from other components of the page. For example: the user clicks a button in component A, but something needs to change in component B as well. This can now be linked together by a non-developer using Dynamic interactions. This requires some preparation: the developer must have added the declaration and publish step for the event when creating the LWC component.
Learn more
Want to learn more about building components that interact with Dynamic Interactions? Check out Salesforce's blog post here.
Want to learn more about the real-world benefits of a CPQ solution? Read more background information here.
Interested in what we can do for you?
Contact our experts directly. We'd love to hear from you!
Curious for more? Subscribe to the Technical Deep Dive series today.
Receive notification when a new blog arrives
We would love to keep you updated on the latest news.