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

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow