0

I am building a wizard (Next Previous button) using lightning web components for the community users. Is it possible to use Lightning message service for the communication among components?

Thanks
Puneet

1 Answers1

0

The answer is, it depends,

let's say you implemented a wizard which has 3 pages, these 3 pages will have one component for each page, so when user is on page 2, components on page 1 & 3 would not be rendered, hence would not exist, hence LMS cannot be utilized to communicate here.

you can design the wizard in a way that it simply hides the other pages and communicate using LMS.

A better design could be using an enclosing parent container component which holds all the necessary information needed for all the pages, use events to communicate between container and pages.