GoCoding.org

Salesforce Lightning Web Components

by | Jun 10, 2021 | Salesforce

Introduction

Lightning Web Components are created by using Html and JavaScript and thereafter added to the application via point and click tools which is a unique and easy way. These are used more in Salesforce as they are flexible to add and remove easily from Salesforce applications.

What are Web Components?

Lightning Components can be built using Lightning Web Components and Aura components. It is a lightweight framework provided by Salesforce to create the components in an efficient way.

The “helloWorld component” at the right corner is an example of a Web Component created using Html and JavaScript.

Salesforce Web Components

What is Lightning Web Component?

Lightning Web Components are built using Html and JavaScript with an optional CSS for designing purpose.  They can be deployed into salesforce using a simple point and click tools.

Here we see the Html and JavaScript files used to create the above components,

helloWorld.html is the Html file

Lightning Web Component HTML

helloWorld.js is the JavaScript file.

Lightning Web Component Js

Benefits of Lightning Web Component

  1. Ease of Deployment:

After building a lightning web component, even a salesforce admin can deploy it within the application with ease. No need for a developer to do this job.

  1. Easy to Build:

For building Lighting Web Components you don’t need to have much admin knowledge but Html and JavaScript knowledge is enough.

  1. Secured:

It is now more secure as it has a Shadow DOM feature implemented in it.

  1. Light-Weight and Faster:

The Lightning Web Components are Light Weight and runs quickly on any browser.

How to Choose Lightning Web Components or Aura

As it is simple to develop Lighting Web Components, it’s always better to choose a Lighting Web Component. Then there might be a question why Aura?

We go to Aura as LWC doesn’t support all the features in Aura, so when you want to create something more than LWC we use Aura Components.

LWC components can be created and Wrapped in Aura Components for better features in a simple way.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.