LWC: Quick Overview From Salesforce Developer 3 min 20.01.2023

img

What is LWC in Salesforce?

🚀 LWC (Lightning Web Component) introduced in Feb 2019 by Salesforce is a new programming model built on modern browser improvements or web standards. In simple terms, it’s a UI framework that is used to create custom components and to further embed them in Salesforce pages. It contains ready-made UI elements that already come with a design, methods, and decorators for the js controller. You can also write custom CSS styles if necessary.  

As a matter of fact, you can simply create components using HTML, JavaScript, and CSS:

  • HTML provides a structure for your component 
  • JavaScript determines the core business logic and event handling 
  • CSS delivers the look and animation for your component 

How does it work?

LWC allows you to create robust single-page UI applications both for mobile and desktop with responsive and reusable building blocks. With this UI framework, a Salesforce Developer can build customized pages and functions on the Salesforce platform. Also, Salesforce Admins further can deploy these reusable blocks for different use cases.  

What are the benefits of LWC?

  • 1. The key benefit of Salesforce LWC is the ability to build mobile-friendly components using a standardized JavaScript framework.  
  • 2. Lightning web components allow to create custom and reusable HTML tags for web pages and applications.  
  • 3. LWC contains many ready-made solutions and is supported by modern browsers.  
  • 4. It’s an easy way for Salesforce Developers to learn to code in LWC.   

What is the difference between Aura and LWC?

LWC is a more modern way of building lightning components than Aura – another popular framework for building web applications. It has an architecture that is closer to modern frameworks like React and Angular.

LWC vs Aura: which one to choose?

LWC is preferable, but sometimes it doesn’t have all features from Aura (because Aura is 3 years older than LWC) and we have to use Aura.  

Can LWC and Aura be together? 

Yes, they can. LWC and Aura components can be interoperated. Together they can do the following:  

  • LWC and Aura can coexist on the same page  
  • LWC can be included in Aura
  • LWC and Aura share the same base Lightning components and underlying services such as User Interface API, Lightning Data Service, e.g.  

What is the best way to learn LWC?

You need to have the basics of Salesforce DX and Salesforce CLI. You will use a configured org in your Trailhead account and VS Code with the Salesforce Extension Pack. If you are new to developing Lightning, you can use the Lightning Web Components programming model.   

Also, you can learn more about Salesforce LWC on Trailhead – a free online learning platform invented by Salesforce – starting from “Quick Start: Lightning Web Components” in the “Build Lightning Web Components” module. Google the developer.salesforce.com to read more LWC and learn how to create, debug and test Lightning Web Components. And you can find useful materials to study in Salesforce Ben Blog and in the “Your Guide to Lightning Web Components: Let’s Explore LWC’s” article.  

person
Still, have questions about Salesforce features and solutions?
Contact us to improve your business automation with Salesforce!