Salesforce Platform Developer I (legacy) — Question 155

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.

In which two ways can this be accomplished? (Choose two.)

Answer options

Correct answer: B, C

Explanation

The correct methods for passing data from a parent to a child Lightning web component are through invoking a method in the child component (B) and using a public property (C). Custom events (A) are used for sending data from child to parent, while Apex (D) is not directly applicable for passing data between components.