function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jugbeer BholaJugbeer Bhola 

Define Lightning Web Component Attribute as Structure of Class

In a Lightning Aura Component an attribute can be defined in the .cmp as an object from the Apex component class.

Example: <aura:attribute name="productObject" type="ProducController.ProductWrapper[]"/>

How can that same thing be accomplished in a Lightning Web Component?
ANUTEJANUTEJ (Salesforce Developers) 
Hi Jugbeer,

There is a great illustration on the medium link that is present in  migrating to lwc documentation it clearly shows the equivalence of lightning components parts to lwc parts, Link to the image (https://medium.com/@rajasneha20/lightning-web-components-migration-cheatsheet-c8ef6352ee04)

>> https://www.sfdcpoint.com/salesforce/wrapper-class-in-lwc/

In the above link there are implementations of how to use wrapper classes in lwc.

    .........................
    @wire(ProduceWrapper) ProductAttri;
    .........................

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
Jugbeer BholaJugbeer Bhola
Anutej, Having a hard time explaining what is required.  I tried your suggestion and every example I look at wants the class to return data.  In this case all that is needed is the structure that exists in the Apex class. No data.  Data is manipulate in the LWC only.  Would like to use the structure over and over instead of coding it in a Javascript.