How to Setup Lightning Web Components (LWC) in Salesforce and Deploy LWC to the Salesforce Org
Lightning Web Component (LWC) is announced in Spring’19 release, & it is fast because it depends on the browser performance. It uses the latest versions of JavaScript.
To build Lightning components, we have two models:
- Lightning Web Components
- Aura Components.
Lightning Web Component runs fast because it is built on the latest Web Standards. So, Lightning web Component supports browsers, lightweight and delivers exceptional performance.
Prerequisites to Create Lightning Web Component
- Salesforce Developer Edition Org.
- Visual Studio Code.
- Salesforce Extension Pack For VSCode.
Step 1) Salesforce Org setup
- Login to your Salesforce Org or sign up for the new org using URL: Salesforce Login
- Now, search the My Domain in the Quick Find Box then setup your domain.
- Once it is completed, then search the Dev Hub in the Quick Find Box and Enable it.
Step 2) Setup SalesforceDX with VSCode
- Download and Install Salesforce CLI. Here is a link for download.
- Download and Install the latest version of VSCode . Here is a link to download.
- Install the Salesforce Extension Pack by searching on the VSCode Marketplace.
3. 1. Search for Salesforce Extension Pack and Install.
3. 2. After that install Salesforce Lightning Web Component Extension.
Once you completed the installation of these two Extension, then re-start the VS Code.
Now, you have completed the setup to create the Lightning Web Component. It’s time to create your first Lightning Web Component.
Step 3) Create your own SalesforceDx Project
- We will create project here with some steps
Press “CTRL+SHIFT+P” then select “SFDX:Create Project with Manifest“. Then enter project and select folder.
2. Then Press “CTRL+SHIFT+P” then select “SFDX: Authorize an Org” to Authorize your org.
To Learn how to Create Toasts in Lightning Web Component, Click Here.
To Learn More About Salesforce Lightning Web Components, Click Here.
For more detail goto:
1) https://trailhead.salesforce.com/en/content/learn/projects/quick-start-lightning-web-components
If you have any suggestions or issue with it, you can post in comment box.
Happy Learning
Support: For any further Salesforce support, Chat with us
Recent Comments