You need to sign in to do that
Don't have an account?
GÜNES Admin
How to share variable value between two LWC on the same Lightning Record Page?
Hi everyone!
This is custom object development.
The question is how to share variables between LWC on the same Lightning Record Page?
In this particular context:
A variable value on first component (LWC #1) will decide if the Lightning Card on the second component (LWC #2) will be visible or not.
But, I am not sure how I can pass on a dynamic variable value from one LWC to another. Because the visibility should change based on the variable value.
Thank you!
This is custom object development.
The question is how to share variables between LWC on the same Lightning Record Page?
In this particular context:
A variable value on first component (LWC #1) will decide if the Lightning Card on the second component (LWC #2) will be visible or not.
But, I am not sure how I can pass on a dynamic variable value from one LWC to another. Because the visibility should change based on the variable value.
Thank you!
If they are not in the heirarchy you can use lightning message service for this. More details in my article https://www.codekiat.com/2020/08/Implement-lightning-message-service-lms-salesforce.html