Notes
Decorators in LWC (Lightning Web Components) are special annotations that are used to define metadata about a class, method or property. In Salesforce, LWC decorators are used to enable specific functionality or to define how a component should behave.
There are several decorators available in LWC, including:
-
@api
: This decorator is used to expose a public property or method that can be accessed by parent components.
-
@wire
: This decorator is used to establish a wire adapter, which is used to fetch data from Salesforce backend systems.
-
@track
: This decorator is used to track changes to a property or object and re-render the component when necessary.