Salesforce Fact #700 | lwc:spread in action
Now we can spread properties in child LWC component after it is passed from parent component. Thanks to Summer'23 release.
With lwc:spread directive, we can pass the entire object's properties as key,value pair to child component instead of passing individual attributes and in the child component we can create public properties for individual attribute and access the data.
Note: This does not work yet for nested object structure.
Reference: https://help.salesforce.com/s/articleView?id=release-notes.rn_lwc_directives.htm&release=244&type=5
Attached are the screenshots.
Comments
Post a Comment