Getting started with Lightning Web Components
Software requirements for developing Lightning Web Components:
1.Salesforce CLI
2.VS code
3.Salesforce extension pack(extension of VScode).
4.Lightning web components(extension of VS code).
Steps for getting started:
1.Open VScode.
This is what it would look like.
2.Press Cntrl+Shift+P
Then select 'Create Project'.
Following screen asking for name of component will appear.
Give name of project as 'test'.Then it will ask for the path for creating the project.Give any path and press enter.You will get notification at bottom saying 'Running SFDX:Create Project' and then boom you will be presented with the following screen. In background folder with name 'test' will be created in your selected directory.
Now you have successfully created a project.You will see following screen:
Now right click on lwc(4) from screenshot,and select 'Create Lightning Web Component ' as below:
After this one folder will be created under lwc folder with the name of the component that you have given earlier .You will have 3 files in that folder as shown below.
1.testcomponent.html
2.testcomponent.js
3.testcomponent.js-meta.xml
voila! you have created your first lightning web component.
1.Salesforce CLI
2.VS code
3.Salesforce extension pack(extension of VScode).
4.Lightning web components(extension of VS code).
Steps for getting started:
1.Open VScode.
This is what it would look like.
2.Press Cntrl+Shift+P
Then select 'Create Project'.
Following screen asking for name of component will appear.
Give name of project as 'test'.Then it will ask for the path for creating the project.Give any path and press enter.You will get notification at bottom saying 'Running SFDX:Create Project' and then boom you will be presented with the following screen. In background folder with name 'test' will be created in your selected directory.
Now you have successfully created a project.You will see following screen:
After this one folder will be created under lwc folder with the name of the component that you have given earlier .You will have 3 files in that folder as shown below.
2.testcomponent.js
3.testcomponent.js-meta.xml
voila! you have created your first lightning web component.






It was so helpful while creating my first web component project. Good work Abdul..
ReplyDeleteNice explanation, simple to understand and implement. Great work, waiting for more blogs related to LWC.
ReplyDeleteNice blog Abdul. Easy and helpful for beginners.
ReplyDelete