Converting Lightning component to LWC
Today we will see how can we convert an existing Lightning Component to Lightning Web Component (LWC). I will convert the Org Limits Lightning component that I published in my last blog spot to a LWC component. The basic structure of a lightning web component consists of a HTML file, a JS file and a xml file. The .html file in LWC is equivalent to the .cmp file present in Aura. The .js file in LWC is equivalent to the combination of controller.js and helper.js files present in Aura The xml file in LWC contains the meta information such as api version. Lets see step by step how to convert the Org Limits component. First we will convert the OrgLimits.cmp to orgLimitsLWC.html <aura:component implements="flexipage:availableForAllPageTypes" controller="OrgLimitsCtrl"> The <aura:component> tag in LC gets replaced by <template> tag in LWC. The implements attribute containing value flexipage:availableForAllPageTypes gets shifted to the xm...