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
Lukesh KarmoreLukesh Karmore 

@track data; what data denote in wire method in LWC

@track data; what data denote in wire method in LWC can any one explain
thank you

 
Nisar AhmadNisar Ahmad
Hi Lukesh,

@track: To track a private property’s value and rerender a component when it changes, decorate the property with @track. Tracked properties are also called private reactive properties.

Fields are reactive. If a field’s value changes and the field is used in a template or in a getter of a property that’s used in a template, the component rerenders and displays the new value.
There is one use case for @track. When a field contains an object or an array, there’s a limit to the depth of changes that are tracked. To tell the framework to observe changes to the properties of an object or to the elements of an array, decorate the field with @track
 
Lukesh KarmoreLukesh Karmore
Read the question NIsar, what i asked