Tuesday, 26 March 2019

Create Lightning Web Components - Basic - Key Points

You can learn creating a simple lightning web component from the below trailhead module,

I wanted to highlight the key points from the above modules,
  • You can use if:false and if:true conditional directives within your template to determine which visual elements are rendered. Similar to rendered in the visualforce page or aura:if in the aura components. 
  • Lightning web components use common JavaScript ECMAScript 8 methods and syntax.
  • The JavaScript file for a Lightning web component must include at least this code, where MyComponent is the name you assign your component class.

  1. import { LightningElement } from 'lwc';
  2. export default class MyComponent extends LightningElement {
  3. }

  • The export statement defines a class that extends the LightningElement class. As a best practice, the name of the class usually matches the file name of the JavaScript class, but it’s not a requirement.
  • Decorators are often used in JavaScript to extend the behavior of a class, property, getter, setter, or method.
    • @api: Marks a property as public for use in your template or other components.
    • @track: Marks a property for internal monitoring. A template or function using this property forces a component to rerender when the property’s value changes. Use this to store values locally, especially as a user interacts with your component.
    • @wire: Gives you a way to get and bind data. This implementation simplifies getting data from a Salesforce org
  • But, be aware, apply only one Lightning Web Component decorator to a property at a time. For example, a property can’t have @api (public reactive) and @track (private reactive) decorators at the same time.
  • Respond to any of these lifecycle events using callback methods. For example, the connectedCallback() is invoked when a component is inserted into the DOM. The disconnectedCallback() is invoked when a component is removed from the DOM.

26 comments:

  1. Thanks a lot for sharing that useful information. That was a really Intresting post and I would really like to know more.

    salesforce development company
    Salesforce development services
    Salesforce Consultant

    ReplyDelete
  2. Thanks for sharing your knowledge to help others.

    Very useful Article.

    wordpress customer portal

    ReplyDelete
  3. Appreciating the persistence you put into your blog and detailed information you provide.

    Oracle dba training chennai | oracle dba training course chennai

    ReplyDelete
  4. Thanks for sharing such a nice post with us. Your post is really helpful Top Web Designing Services

    ReplyDelete
  5. Wow ! Amazing information showing through your blog, it's a beautiful decoration things.Thanks for sharing.
    Destech Media

    ReplyDelete
  6. Nice Blog! This blog is very informative for us. Keep it up in future for these kinds of blogs. Thanks for sharing it with us Mobile App Development Services

    ReplyDelete
  7. Amazing post, Contact us for Professional Web Designing Services at affordable prices.

    ReplyDelete
  8. Website is the digital address for your business. Your website should be interesting & appealing and responsive. At Digitalfreelancer360, we offer end-to-end web designing services for organizations as per their needs. Our web designer freelance consultant is highly skilled & experienced in creating the best websites for your business. Contact Us: 8920928177

    ReplyDelete
  9. Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog.
    Choose ACAP, the top-rated Salesforce development company for small businesses. ACAP’s certified Salesforce developer consultants specialize in customization, migration and integration of award-winning, affordable solutions.

    ReplyDelete
  10. Wow, very informative blog! Post more blogs like this. If you want tailor-made solutions from the dedicated developers that satisfy your budget and expectations, then visit the best Web Development Company in Delhi.

    ReplyDelete
  11. The best casino site on Steam | drmcd
    The best casino site on Steam 남원 출장안마 is at the 영천 출장마사지 best casino 안양 출장샵 site on Steam. There are 사천 출장샵 a variety of games on here and the best experience. 청주 출장마사지 Rating: 4 · ‎6 votes

    ReplyDelete
  12. IIS India, a leading web designing company in Delhi, specializes in crafting stunning and functional websites. Our expert team combines creativity and technical expertise to deliver custom web solutions.

    ReplyDelete
  13. IIS India, a leading website designing company in Delhi, transforms visions into stunning online realities. Our expert team crafts user-friendly, responsive websites tailored to your brand, ensuring seamless user experiences.

    ReplyDelete
  14. QUICK EASY EMERGENCY URGENT LOANS LOAN OFFER EVERYONE APPLY NOW +918929509036 financialserviceoffer876@gmail.com Dr. James Eric

    ReplyDelete
  15. Nice and informative blog! This type of information specializes in creating intuitive, user-friendly apps tailored to your unique business needs.
    If you want to know about Mobile App Design and Development Company then you can click here.
    Thanks for sharing.

    ReplyDelete
  16. Looking for top-notch website design companies in Delhi? IIS India is your go-to destination for creating visually stunning and user-friendly websites. Our expert team ensures that your site is not only aesthetically pleasing but also optimized for performance and user experience. website design companies in delhi From responsive designs to seamless navigation, we cater to all your web development needs. Partner with IIS India to elevate your online presence and drive business growth.

    ReplyDelete
  17. Looking for the best web designing company in Delhi? Look no further than IIS India. We specialize in creating stunning, responsive websites that not only capture your brand's essence but also engage your audience effectively. web designing company in delhi Our team of expert designers uses the latest technologies and design trends to ensure your website stands out in the competitive digital landscape. Whether you need a simple website or a complex e-commerce platform, IIS India delivers tailored solutions that drive results. Partner with us to elevate your online presence.

    ReplyDelete
  18. Looking for the best website design company in Delhi IIS India offers top-notch web design and development services tailored to your business needs. With a focus on creativity, user experience, and cutting-edge technology, IIS India ensures that your website stands out and drives results.

    ReplyDelete
  19. Looking for the best website design company in Delhi IIS India combines innovation and expertise to create visually stunning, user-friendly websites tailored to your brand. With a dedicated team of professionals, IIS India delivers solutions that boost engagement and drive results. Transform your online presence with Delhi’s trusted design experts.

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete

Activities: Assign Tasks to a Queue Salesforce Lightning

Salesforce announced to assign Tasks to a Queue beginning from Spring'20 release. How does it work? In Setup, enter Queues in th...