Activity Forums Salesforce® Discussions What is the use of decorators in Salesforce LWC?

  • Marziya

    Member
    December 17, 2020 at 1:47 pm

    Decorators dynamically alter the functionality of a property or function. The ability to create decorators is part of ECMAScript, but these three decorators are unique to Lightning Web Components. @api: To expose a public property, decorate it with @api. Public properties define the API for a component.

  • Shweta

    Member
    December 18, 2020 at 3:04 pm

    Lightning Web Components programming model has three decorators that add functionality to a property or function. And the 3 Decorators in Lightning Web Components are
    1) @api
    2) @track
    3) @wire

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos