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.
Hmm, I'm not sure about option A. Invoking a public method in the child component doesn't seem like the best way to pass data. It feels a bit too complicated compared to the other options.
Yeah, I agree with Arletta. The public property and custom event options make the most sense to me. Option C involving the Apex controller seems a bit overkill for this use case.
I think options B and D are the correct ways to pass data from the parent to the child component. Using a public property or a custom event seems like the most straightforward approach.
I'm not sure about option C and D. Using the Apex controller class seems unnecessary for passing data, and custom events might be more suitable for other purposes.
Lashawn
27 days agoMagnolia
4 days agoTheresia
30 days agoFlorencia
4 days agoTimothy
12 days agoWillard
1 months agoCamellia
5 days agoAimee
20 days agoElin
1 months agoArletta
2 months agoAzalee
30 days agoAlyce
1 months agoBuddy
2 months agoVallie
2 months agoAleshia
2 months ago