Salesforce has introduced a new programming model for
lightning components called ‘Lightning Web Components’. It leverages web
standards breakthroughs, can coexist and interoperate with the Aura programming
model, and delivers unparalleled performance. But to use that we need sfdx.
This blog post will show you how to create a very basic LWC
and to understand the core concept of it.
This xml file determine where these lwc can
isExposed flag determines if you are
exposing component to push to your scratch org. By default the value is false. Remember
to make it true before you push.
Run the below command to check the
difference between your local and scratch org.
Below is the result:
Push the changes to scratch org.
Changes will be pushed from your local to your scratch org.
Now this custom Lightning Web Component is available to you
use in lightning app builder pages.
If you click on Load contact button it should retrieve all
the available contacts from your org. It makes server side apex call to fetch
In this Lightning web component Series, I will go in much deeper concept in my next posts. I will cover what is the differences between LWC and aura framework and what is performance improvement factors of this new frame work.