Salesforce Fact #353 | Pass value as object structure to child LWC

Suppose we have a use case to pass object like structure data from parent LWC to child LWC. Now, generally we pass individual values considering public property for each of the attribute. But do you know you can pass the data as an object structure as well. This will reduce the number of public properties in the child as the single object structure would be acting as the public property.

In this example, we have simple input fields for capturing the employee name and years of experience and that we are passing as an object structure to the child component.

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