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.
we have to pass the value in DETAIL section, so B is correct answer
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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
1 year agoSapphire808
1 year, 1 month agoBrucePark
1 year, 3 months agoRegNav
1 year, 6 months agoUllr
1 year, 7 months ago