Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 5 Question 65 Discussion

What are two best practices when it comes to Lightning Web Component events?
A) Use event.target to communicate data to elements that aren't in the same shadow tree. and C) Use CustomEvent to pass data from a child to a parent component.
B) Use events configured with bubbles: false and composed:false.
D) Use event.detail to communicate data to elements in the same shadow tree

Salesforce DEX-450 Exam - Topic 5 Question 65 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 65
Topic #: 5
[All DEX-450 Questions]

What are two best practices when it comes to Lightning Web Component events?

Show Suggested Answer Hide Answer
Suggested Answer: A, C

Contribute your Thoughts:

0/2000 characters
Lauran
7 months ago
I thought event.target was a no-go for shadow DOM stuff?
upvoted 0 times
...
Denny
7 months ago
Totally agree with C! CustomEvent is super handy.
upvoted 0 times
...
Cherilyn
7 months ago
Wait, are we really using bubbles: false? Seems counterintuitive.
upvoted 0 times
...
Staci
8 months ago
I think A is also important for cross-shadow communication.
upvoted 0 times
...
Queen
8 months ago
Definitely C and D are the way to go!
upvoted 0 times
...
Ryan
8 months ago
I think we discussed that events with bubbles: false and composed: false aren't really best practices. They limit the event's reach, right?
upvoted 0 times
...
Malika
8 months ago
I recall that using event.detail is important for communicating within the same shadow tree. It makes sense, but I hope I remember the specifics correctly.
upvoted 0 times
...
Lashonda
8 months ago
I'm not so sure about the event.target thing. I remember something about it, but it seems a bit tricky when dealing with shadow DOM.
upvoted 0 times
...
Carol
8 months ago
I think using CustomEvent to pass data from a child to a parent component is definitely a best practice. It feels right based on what we practiced.
upvoted 0 times
...
Skye
8 months ago
Hmm, this is a tricky one. I know diabetes can cause some serious issues, so I'll need to think carefully about the best approach here.
upvoted 0 times
...
Theron
8 months ago
Not sure about this one. I'll have to think it through carefully and eliminate the options that don't make sense based on the information provided.
upvoted 0 times
...
Reiko
8 months ago
Okay, let's see... I think the Central Admin Server and Managed Backup Exec Server need to be configured, and the NDMP option must be installed. That's my best guess.
upvoted 0 times
...
Antione
8 months ago
I remember practicing a similar question, and I think security groups and maybe 2-Factor authentication could be the right combo.
upvoted 0 times
...

Save Cancel