Newer Version Available
Lightning Message Service Limitations
Keep the following in mind when working with the lightning:messageChannel component.
- No AppExchange Support
- In the beta release, don't include message channels in packages that you publish on AppExchange.
- Unsupported Experiences
- Lighting message service doesn’t support the following experiences:
- Salesforce Mobile app
- Lightning Out
- Lightning Communities
- Aura Components That Don’t Render Aren’t Supported
- Lightning message service only supports Aura components that render. You can’t use lightning:messageChannel in an Aura component that uses the background utility item interface. Similarly, Aura components that use lightning:messageChannel can’t call Lightning message service methods in the init lifecycle handler because the component hasn’t rendered.
- lightning:messageChannel Must Be a Child of aura:component
- In a custom Aura component, lightning:messageChannel must be an immediate child of the aura:component tag. It can’t be nested in an HTML tag or
another component.
For example, the following code renders without a problem.
1<aura:component> 2 <lightning:messageChannel type="myMessageChannel__c" /> 3 <lightning:card>...</lightning:card> 4</aura:component>This code throws an error when the Aura component tries to render.
1<aura:component> 2 <lightning:card> 3 <lightning:messageChannel type="myMessageChannel__c" /> 4 </lightning:card> 5</aura:component>