Activity Forums Salesforce® Discussions What is decorators in Salesforce lightning web component?

  • What is decorators in Salesforce lightning web component?

    Posted by Aditya on December 17, 2020 at 9:50 am

    What is decorators in Salesforce lightning web component?

    Shweta replied 4 years ago 3 Members · 2 Replies
  • 2 Replies
  • Marziya

    Member
    December 17, 2020 at 1:49 pm

    The Lightning Web Components programming model has three decorators that add functionality to a property or function.
    The ability to create decorators is part of ECMAScript, but these three decorators are unique to Lightning Web Components.

  • Shweta

    Member
    December 17, 2020 at 3:24 pm

    Decorators are literally used to decorate the code with clean syntax. They are simple functions and they dynamically change the functionality of property or function. They are identified with the symbol ‘@’ as prefixed before a method or a variable name.Whenever we want to use any decorator, we must need to explicitly import it from ‘lwc’

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos