3

Can I access the recordId directly in a LWC child component instead of passing it from parent component?

I put @api recordId in child component but im getting undefined.

1
  • no, you can't. you have to pass it from the parent. Commented Oct 2, 2020 at 13:10

1 Answer 1

3

No. Child components must receive their recordId from the parent. Only top-level components get the recordId from a Record Page view.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .