What is Lightning Web Component?
Lightning components can be built using two methodologies
namely lightning aura component and Lightning web component. For end users both
are same.
Lightning Web Components is a new framework for building
Lightning components. For Lightning Web Components development you need to
setup SalesforceDX and VsCode as Lightning web component are currently not
available in Developer console.
In 2014, Salesforce launched the Lightning Component
framework supported by the Aura programming framework. Since the web standards
offered limited feasibility to build large-scale web applications at the time,
Aura came with its component-driven model that allowed developers to build
large-scale client applications on the web.
The web stack has seen an unprecedented level of innovation
and standardization that transformed it from being a rudimentary page-rendering
platform to a web development platform. This is the reason salesforce came with
leveraging the offerings of web and let the heavy lifting to browser and code
on top of it, which led them to created Lightning web component.
Introduction:
Lightning Web Components (LWC) is a stack of modern
lightweight frameworks built on the latest web standards. It is a DOM (Document
Object Model), element created through reusable code and is used to generate a
dynamic interface without using JavaScript or building a Library. This
feasibility makes it quick and seamless, saving the developers a ton of time
and effort on the Web Stack. Let’s look at some of its remarkable features:
- Improved performance of the component as most of the code is recognized by the native web browser engine and web stack.
- Ability to compose applications using smaller chunks of code since the crucial elements that are required to create a component is part of the native web browser engine and web stack.
- Increase in the robustness of the applications built using LWCs as they are inclusive of the said modern web standards.
- Parallel interoperability and feasibility to use both Lightning Web Components and Aura components together in the applications with no visible differentiation to the end-users.
Web Stack Transformation:
Let's have a look on the web stack transformation which
helped salesforce to coin new concept of building lightning components(LWC).
![]() |
Web Stack Transformation |
While developing prior to 2019, there use to be a layer
between web stack and UI. The mid-layer languages basically comprise of
javascript, which is now part of modern web standards.
With browser getting mature, it give more power to our web
Stack to create a lightning UI component, It doesn’t require a mid-Layer to the
browser which impacts our speed and performance. This one is the main reason
developers are struggling within Aura.
Aura-based Lightning components are built using both HTML and
JavaScript, but Web Component(LWC) is built directly on the Web stack.
Creating an LWC is fast as it no longer requires the user to
download the JavaScript and wait for the engine to compile it before rendering
the component.
Lightning Web Components supports the same browsers as
Lightning Experience.
Note: Development of LWC component is not supported in Developer Console.