A developer created a weather app that contains multiple Lightning web components that are in different DOM trees. One of the components, called Toggle, has a toggle for Fahrenheit or Celsius units. Another component, called Temperature, displays the current temperature in the unit selected in the Toggle component. When a user toggles from Fahrenheit to Celsius or vice versa in the Toggle component, the information must be sent to the Temperature component so the temperature can be converted and displayed. What is the recommended way to accomplish this? A. Create a custom event to handle the communication between components. B. The Toggle component should call a method in the Temperature component. C. Use Lightning Message Service to communicate between the components. D. Use an application event to communicate between the components. Â Suggested Answer: A Community Answer: C This question is in CRT-450 Salesforce Certified Platform Developer I Exam For getting Salesforce Certified Platform Developer I Disclaimers: The website is not related to, affiliated with, endorsed or authorized by Salesforce. Trademarks, certification & product names are used for reference only and belong to Salesforce. The website does not contain actual questions and answers from Salesforce's Certification Exams.
Please login or Register to submit your answer