ForceLearn
Introduction to Lightning Web Component

Introduction to Lightning Web Component

Introduction to Lightning Web Component

Hi Guys,

Welcome back, we have started with new topics to get an intro on Lightning web components and Setup for them.

Prerequisites:

1. Click here to download Salesforce CLI and install on your local machine

2. Open CMD And type sfdx plugins:install salesforcedx@pre-release.

3. Download VS Code from the below link and install VS Code in the local machine and open it.

4. Install Salesforce Extension Pack and salesforce Lightning Web Components from Extensions

5. Install Lightning Web Components

Developing project in Visual Code

1. Type Ctrl+Win+P type SFDX So it’s working perfectly.

2. Select Create Project with Manifest and type Project Name
3. Select where to save project and New project has been created.

Create Lightning Web Component

1. Type Shift+Ctrl+P and type SFDX:Create lightning Web Component.

2. And store location needs to be save and type name on your web Component

Lightning Web Component Contains 3 files .They are
1. Html
2. Javascriptfile
3. JavaScriptMetafile

You need to authorize your org to push code

Type SFDX: Authorize dev hub

Default browser will open and login into your org with credentials

You are done with login.

Right Click on LWC and Select Deploy to Source Org.

Deployment of code is done successfully.

open Command Palette(Ctrl+shift=P) type SFDX: Open default org

Navigate to Sales app and Home page

Click on Gear icon and edit page and Search for your web component and drag and drop into layout and click on Save.

Hurry !!!! you have designed your first Lightning Web Component and Introduction to Lightning Web Component

Learn more about LWC recipe in sample gallery

ForceLearn

Add comment