What is the correct way to communicate the new value of a property named “passthrough” to my-parent-component if the properly is defined within my-child-component?
B
https://trailhead.salesforce.com/content/learn/projects/communicate-between-lightning-web-components/communicate-from-child-to-parent
Send Data With A Custom Event section
C is correct.
Firstly, the detail param is optional. (https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent)
Secondly, the question doesn't provide anything about the detail param.
Therefore, C is correct.
To pass data to the event you specify an object that includes the ‘detail’ property in the CustomEvent() constructor. This ‘detail’ property is used for passing custom value.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
stan_malta
5 months, 3 weeks agoSapphire808
7 months, 1 week agoBrucePark
8 months, 2 weeks agoRegNav
11 months, 2 weeks agoUllr
1 year, 1 month ago