SlideShare une entreprise Scribd logo
1  sur  13
Walk through
Lightning
Web
Components
Presenter : Shikha.
(Salesforce Developer at CloudAnalogy)
Introduction to Lightning
Web Components
Lightning web components are custom HTML elements built using HTML and modern
JavaScript. Lightning Web Components uses core Web Components standards and provides
only what’s necessary to perform well in browsers supported by Salesforce.
Why LWC ?
❏ LWC’s will take advantage of native web standards that exist in the browser. This means
there is no Aura framework (or any framework for that matter) to slow things down. It also
means LWC’s will most likely render faster than aura components.
❏ LWC is built on web standards for almost all of the code involved,with a minimal amount of
"custom code.This means they are more secure (LWC adds CSS isolation, leverages native
DOM support for better performance, and uses more web-standards JavaScript that can be
optimized better).
❏ LWC itself has a richer API based on the UI-API for better performance and less Apex to
write, and calling Apex is now a less painful experience.
Same but different
Instead of up to 8 files you only need 4. For one: all JavaScript (3 files) now lives in one ES6 JS file and
we don't have an auradoc or svg file for now
Start with writing codes :
● We can create LWC using developer console for that there are two ways.
○ For experiment purpose we can use Playground Link for steps.
○ Or you can set up your development environment Link for steps.
Define a Component
To create a component, first create a folder that bundles your component’s files :
● Component HTML File: Every UI component must have an HTML file with the root tag
<template>.
● Component JavaScript File:Every component must have a JavaScript file. If the component
renders UI, the JavaScript file defines the HTML element.
● Component Configuration File:Every component must have a configuration file. The
configuration file defines the metadata values for the component, including the design
configuration for Lightning App Builder and Community Builder.
➔ Above mentioned file are default ,we can also add CSS and other optional files like “
Additional JavaScript file” with a unique name.
Component JavaScript File
JavaScript files in Lightning web components are ES6 modules. By default, everything declared
in a module is local—it’s scoped to the module.
To import a class, function, or variable declared in a module, use the import statement. To allow
other code to use a class, function, or variable declared in a module, use the export statement.
Decorators
The Lightning Web Components programming model has three decorators that add
functionality to a property or function.The ability to create decorators is part of ECMAScript,
but these three decorators are unique to Lightning Web Components.
1. @api:
To expose a public property, decorate it with @api. An owner component that uses the
component in its markup can access the component’s public properties. See Public
Properties.
2. @track:
To track a private property’s value and rerender a component when it changes, decorate
the property with @track. Tracked properties are also called private reactive properties.
See Tracked Properties.
3. @wire:
To read Salesforce data, Lightning web components use a reactive wire
service. When the wire service provisions data, the component
rerenders. See Use the Wire Service to Get Data and Call Apex
Methods.
Call Apex Methods from Lightning
Web Components
Import Apex Methods
Functions in
Javascript
Call
Functions
Wire Service Call
Imperatively
Wire apex method to a property Wire apex method to a function
Annotate Apex method with
@AuraEnabled(cacheable=true)
Call Apex method using wire service
Syntax
Usage
Imperative Methods
THANK
YOU

Contenu connexe

Tendances

Getting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceGetting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceRahul Malhotra
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Roy Gilad
 
Lightning Components Introduction
Lightning Components IntroductionLightning Components Introduction
Lightning Components IntroductionDurgesh Dhoot
 
Introduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelIntroduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelSalesforce Developers
 
Lightning web components
Lightning web componentsLightning web components
Lightning web componentsAmit Chaudhary
 
Lightning Web Components
Lightning Web ComponentsLightning Web Components
Lightning Web ComponentsAbdulGafoor100
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex codeEdwinOstos
 
Lightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsLightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsDurgesh Dhoot
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
Best Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdfBest Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdfMohith Shrivastava
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
Getting started with Salesforce security
Getting started with Salesforce securityGetting started with Salesforce security
Getting started with Salesforce securitySalesforce Admins
 
Salesforce administrator training presentation slides
Salesforce administrator training presentation slides Salesforce administrator training presentation slides
Salesforce administrator training presentation slides Salesforce Associates
 

Tendances (20)

Getting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceGetting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | Salesforce
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)
 
Lightning Components Introduction
Lightning Components IntroductionLightning Components Introduction
Lightning Components Introduction
 
Introduction to Apex for Developers
Introduction to Apex for DevelopersIntroduction to Apex for Developers
Introduction to Apex for Developers
 
Introduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelIntroduction to the Salesforce Security Model
Introduction to the Salesforce Security Model
 
Lightning web components
Lightning web componentsLightning web components
Lightning web components
 
Lightning Web Components
Lightning Web ComponentsLightning Web Components
Lightning Web Components
 
Introduction to apex code
Introduction to apex codeIntroduction to apex code
Introduction to apex code
 
Lightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsLightning Component - Components, Actions and Events
Lightning Component - Components, Actions and Events
 
Salesforce REST API
Salesforce  REST API Salesforce  REST API
Salesforce REST API
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Introduction to Visualforce
Introduction to VisualforceIntroduction to Visualforce
Introduction to Visualforce
 
Best Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdfBest Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdf
 
An Introduction to Lightning Web Components
An Introduction to Lightning Web ComponentsAn Introduction to Lightning Web Components
An Introduction to Lightning Web Components
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Exploring the Salesforce REST API
Exploring the Salesforce REST APIExploring the Salesforce REST API
Exploring the Salesforce REST API
 
Getting started with Salesforce security
Getting started with Salesforce securityGetting started with Salesforce security
Getting started with Salesforce security
 
Salesforce administrator training presentation slides
Salesforce administrator training presentation slides Salesforce administrator training presentation slides
Salesforce administrator training presentation slides
 

Similaire à Lightning web components

Salesforce Lightning Web Components Overview
Salesforce Lightning Web Components OverviewSalesforce Lightning Web Components Overview
Salesforce Lightning Web Components OverviewNagarjuna Kaipu
 
Lightning Web Component Structure Benefit
Lightning Web Component Structure BenefitLightning Web Component Structure Benefit
Lightning Web Component Structure Benefitqrsolutionsindia
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Componentssonumanoj
 
Silverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternSilverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternDerek Novavi
 
Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Salesforce Developers
 
Salesforce Auckland Developer Meetup - May 2018 - Lightning Web Components
Salesforce Auckland Developer Meetup - May 2018 - Lightning Web Components Salesforce Auckland Developer Meetup - May 2018 - Lightning Web Components
Salesforce Auckland Developer Meetup - May 2018 - Lightning Web Components Ben Edwards
 
Winter '19 release development.ppt
Winter '19 release development.pptWinter '19 release development.ppt
Winter '19 release development.pptKailas Shimpi
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)Igor Talevski
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshareSaleemMalik52
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handsonPrashant Kumar
 
Introduction to angular | Concepts and Environment setup
Introduction to angular | Concepts and Environment setupIntroduction to angular | Concepts and Environment setup
Introduction to angular | Concepts and Environment setupAnsley Rodrigues
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architectureIblesoft
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the BasicsUlrich Krause
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 

Similaire à Lightning web components (20)

Salesforce Lightning Web Components Overview
Salesforce Lightning Web Components OverviewSalesforce Lightning Web Components Overview
Salesforce Lightning Web Components Overview
 
Introduction to Lightning Web Components
Introduction to Lightning Web ComponentsIntroduction to Lightning Web Components
Introduction to Lightning Web Components
 
Lightning Web Component Structure Benefit
Lightning Web Component Structure BenefitLightning Web Component Structure Benefit
Lightning Web Component Structure Benefit
 
Intro lift
Intro liftIntro lift
Intro lift
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 
Silverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel PatternSilverlight Development & The Model-View-ViewModel Pattern
Silverlight Development & The Model-View-ViewModel Pattern
 
Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1
 
sveltekit-en.pdf
sveltekit-en.pdfsveltekit-en.pdf
sveltekit-en.pdf
 
Salesforce Auckland Developer Meetup - May 2018 - Lightning Web Components
Salesforce Auckland Developer Meetup - May 2018 - Lightning Web Components Salesforce Auckland Developer Meetup - May 2018 - Lightning Web Components
Salesforce Auckland Developer Meetup - May 2018 - Lightning Web Components
 
Winter '19 release development.ppt
Winter '19 release development.pptWinter '19 release development.ppt
Winter '19 release development.ppt
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
 
Introduction to angular | Concepts and Environment setup
Introduction to angular | Concepts and Environment setupIntroduction to angular | Concepts and Environment setup
Introduction to angular | Concepts and Environment setup
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architecture
 
Ibm
IbmIbm
Ibm
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
As pnet
As pnetAs pnet
As pnet
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 

Plus de Cloud Analogy

Zendesk Integration With Salesforce .pptx
Zendesk Integration With Salesforce .pptxZendesk Integration With Salesforce .pptx
Zendesk Integration With Salesforce .pptxCloud Analogy
 
Salesforce Integration With Mailchimp (1).pptx
Salesforce Integration With Mailchimp (1).pptxSalesforce Integration With Mailchimp (1).pptx
Salesforce Integration With Mailchimp (1).pptxCloud Analogy
 
Top Salesforce Integrations For Businesses In 2022
Top Salesforce Integrations For Businesses In 2022Top Salesforce Integrations For Businesses In 2022
Top Salesforce Integrations For Businesses In 2022Cloud Analogy
 
Top 5 Zoho Products And Their Features.pptx
Top 5 Zoho Products And Their Features.pptxTop 5 Zoho Products And Their Features.pptx
Top 5 Zoho Products And Their Features.pptxCloud Analogy
 
SAP vs Oracle: Which ERP System Should You Choose In 2022?
SAP vs Oracle: Which ERP System Should You Choose In 2022?SAP vs Oracle: Which ERP System Should You Choose In 2022?
SAP vs Oracle: Which ERP System Should You Choose In 2022?Cloud Analogy
 
5 Low-Code Tools To Increase Salesforce Admins Productivity
5 Low-Code Tools To Increase Salesforce Admins Productivity5 Low-Code Tools To Increase Salesforce Admins Productivity
5 Low-Code Tools To Increase Salesforce Admins ProductivityCloud Analogy
 
Tips To Make The Most Out Of Salesforce CRM
Tips To Make The Most Out Of Salesforce CRMTips To Make The Most Out Of Salesforce CRM
Tips To Make The Most Out Of Salesforce CRMCloud Analogy
 
5 Tips For Salesforce Admin In 2022
5 Tips For Salesforce Admin In 20225 Tips For Salesforce Admin In 2022
5 Tips For Salesforce Admin In 2022Cloud Analogy
 
Trailhead Badges To Earn In 2022
Trailhead Badges To Earn In 2022Trailhead Badges To Earn In 2022
Trailhead Badges To Earn In 2022Cloud Analogy
 
HubSpot And Slack Integration
HubSpot And Slack IntegrationHubSpot And Slack Integration
HubSpot And Slack IntegrationCloud Analogy
 
Multi-Factor Authentication In Salesforce
Multi-Factor Authentication In SalesforceMulti-Factor Authentication In Salesforce
Multi-Factor Authentication In SalesforceCloud Analogy
 
5 Myths About Salesforce CRM
5 Myths About Salesforce CRM5 Myths About Salesforce CRM
5 Myths About Salesforce CRMCloud Analogy
 
6 Sales Promotion Tips For Marketing Success
6 Sales Promotion Tips For Marketing Success6 Sales Promotion Tips For Marketing Success
6 Sales Promotion Tips For Marketing SuccessCloud Analogy
 
How Marketing Cloud Latest Features Can Improve Your Campaign Performance
How Marketing Cloud Latest Features Can Improve Your Campaign PerformanceHow Marketing Cloud Latest Features Can Improve Your Campaign Performance
How Marketing Cloud Latest Features Can Improve Your Campaign PerformanceCloud Analogy
 
Important Salesforce Trends to Watch Out for in 2022
Important Salesforce Trends to Watch Out for in 2022Important Salesforce Trends to Watch Out for in 2022
Important Salesforce Trends to Watch Out for in 2022Cloud Analogy
 
How To Build Your Sales Career In The Salesforce Ecosystem
How To Build Your Sales Career In The Salesforce EcosystemHow To Build Your Sales Career In The Salesforce Ecosystem
How To Build Your Sales Career In The Salesforce EcosystemCloud Analogy
 
Best Sales Metrics Every Sales Leader Should Know
Best Sales Metrics Every Sales Leader Should KnowBest Sales Metrics Every Sales Leader Should Know
Best Sales Metrics Every Sales Leader Should KnowCloud Analogy
 
Common Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCommon Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCloud Analogy
 
5 Accurate Sales Forecasting Strategies To Predict Your Revenue
5 Accurate Sales Forecasting Strategies To Predict Your Revenue5 Accurate Sales Forecasting Strategies To Predict Your Revenue
5 Accurate Sales Forecasting Strategies To Predict Your RevenueCloud Analogy
 
How To Utilize Slack As A Secret Weapon For Your Sales Team
How To Utilize Slack As A Secret Weapon For Your Sales TeamHow To Utilize Slack As A Secret Weapon For Your Sales Team
How To Utilize Slack As A Secret Weapon For Your Sales TeamCloud Analogy
 

Plus de Cloud Analogy (20)

Zendesk Integration With Salesforce .pptx
Zendesk Integration With Salesforce .pptxZendesk Integration With Salesforce .pptx
Zendesk Integration With Salesforce .pptx
 
Salesforce Integration With Mailchimp (1).pptx
Salesforce Integration With Mailchimp (1).pptxSalesforce Integration With Mailchimp (1).pptx
Salesforce Integration With Mailchimp (1).pptx
 
Top Salesforce Integrations For Businesses In 2022
Top Salesforce Integrations For Businesses In 2022Top Salesforce Integrations For Businesses In 2022
Top Salesforce Integrations For Businesses In 2022
 
Top 5 Zoho Products And Their Features.pptx
Top 5 Zoho Products And Their Features.pptxTop 5 Zoho Products And Their Features.pptx
Top 5 Zoho Products And Their Features.pptx
 
SAP vs Oracle: Which ERP System Should You Choose In 2022?
SAP vs Oracle: Which ERP System Should You Choose In 2022?SAP vs Oracle: Which ERP System Should You Choose In 2022?
SAP vs Oracle: Which ERP System Should You Choose In 2022?
 
5 Low-Code Tools To Increase Salesforce Admins Productivity
5 Low-Code Tools To Increase Salesforce Admins Productivity5 Low-Code Tools To Increase Salesforce Admins Productivity
5 Low-Code Tools To Increase Salesforce Admins Productivity
 
Tips To Make The Most Out Of Salesforce CRM
Tips To Make The Most Out Of Salesforce CRMTips To Make The Most Out Of Salesforce CRM
Tips To Make The Most Out Of Salesforce CRM
 
5 Tips For Salesforce Admin In 2022
5 Tips For Salesforce Admin In 20225 Tips For Salesforce Admin In 2022
5 Tips For Salesforce Admin In 2022
 
Trailhead Badges To Earn In 2022
Trailhead Badges To Earn In 2022Trailhead Badges To Earn In 2022
Trailhead Badges To Earn In 2022
 
HubSpot And Slack Integration
HubSpot And Slack IntegrationHubSpot And Slack Integration
HubSpot And Slack Integration
 
Multi-Factor Authentication In Salesforce
Multi-Factor Authentication In SalesforceMulti-Factor Authentication In Salesforce
Multi-Factor Authentication In Salesforce
 
5 Myths About Salesforce CRM
5 Myths About Salesforce CRM5 Myths About Salesforce CRM
5 Myths About Salesforce CRM
 
6 Sales Promotion Tips For Marketing Success
6 Sales Promotion Tips For Marketing Success6 Sales Promotion Tips For Marketing Success
6 Sales Promotion Tips For Marketing Success
 
How Marketing Cloud Latest Features Can Improve Your Campaign Performance
How Marketing Cloud Latest Features Can Improve Your Campaign PerformanceHow Marketing Cloud Latest Features Can Improve Your Campaign Performance
How Marketing Cloud Latest Features Can Improve Your Campaign Performance
 
Important Salesforce Trends to Watch Out for in 2022
Important Salesforce Trends to Watch Out for in 2022Important Salesforce Trends to Watch Out for in 2022
Important Salesforce Trends to Watch Out for in 2022
 
How To Build Your Sales Career In The Salesforce Ecosystem
How To Build Your Sales Career In The Salesforce EcosystemHow To Build Your Sales Career In The Salesforce Ecosystem
How To Build Your Sales Career In The Salesforce Ecosystem
 
Best Sales Metrics Every Sales Leader Should Know
Best Sales Metrics Every Sales Leader Should KnowBest Sales Metrics Every Sales Leader Should Know
Best Sales Metrics Every Sales Leader Should Know
 
Common Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation ChallengesCommon Salesforce CPQ Implementation Challenges
Common Salesforce CPQ Implementation Challenges
 
5 Accurate Sales Forecasting Strategies To Predict Your Revenue
5 Accurate Sales Forecasting Strategies To Predict Your Revenue5 Accurate Sales Forecasting Strategies To Predict Your Revenue
5 Accurate Sales Forecasting Strategies To Predict Your Revenue
 
How To Utilize Slack As A Secret Weapon For Your Sales Team
How To Utilize Slack As A Secret Weapon For Your Sales TeamHow To Utilize Slack As A Secret Weapon For Your Sales Team
How To Utilize Slack As A Secret Weapon For Your Sales Team
 

Dernier

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Dernier (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Lightning web components

  • 1. Walk through Lightning Web Components Presenter : Shikha. (Salesforce Developer at CloudAnalogy)
  • 2. Introduction to Lightning Web Components Lightning web components are custom HTML elements built using HTML and modern JavaScript. Lightning Web Components uses core Web Components standards and provides only what’s necessary to perform well in browsers supported by Salesforce.
  • 3. Why LWC ? ❏ LWC’s will take advantage of native web standards that exist in the browser. This means there is no Aura framework (or any framework for that matter) to slow things down. It also means LWC’s will most likely render faster than aura components. ❏ LWC is built on web standards for almost all of the code involved,with a minimal amount of "custom code.This means they are more secure (LWC adds CSS isolation, leverages native DOM support for better performance, and uses more web-standards JavaScript that can be optimized better). ❏ LWC itself has a richer API based on the UI-API for better performance and less Apex to write, and calling Apex is now a less painful experience.
  • 4. Same but different Instead of up to 8 files you only need 4. For one: all JavaScript (3 files) now lives in one ES6 JS file and we don't have an auradoc or svg file for now
  • 5. Start with writing codes : ● We can create LWC using developer console for that there are two ways. ○ For experiment purpose we can use Playground Link for steps. ○ Or you can set up your development environment Link for steps.
  • 6. Define a Component To create a component, first create a folder that bundles your component’s files : ● Component HTML File: Every UI component must have an HTML file with the root tag <template>. ● Component JavaScript File:Every component must have a JavaScript file. If the component renders UI, the JavaScript file defines the HTML element. ● Component Configuration File:Every component must have a configuration file. The configuration file defines the metadata values for the component, including the design configuration for Lightning App Builder and Community Builder. ➔ Above mentioned file are default ,we can also add CSS and other optional files like “ Additional JavaScript file” with a unique name.
  • 7. Component JavaScript File JavaScript files in Lightning web components are ES6 modules. By default, everything declared in a module is local—it’s scoped to the module. To import a class, function, or variable declared in a module, use the import statement. To allow other code to use a class, function, or variable declared in a module, use the export statement.
  • 8. Decorators The Lightning Web Components programming model has three decorators that add functionality to a property or function.The ability to create decorators is part of ECMAScript, but these three decorators are unique to Lightning Web Components. 1. @api: To expose a public property, decorate it with @api. An owner component that uses the component in its markup can access the component’s public properties. See Public Properties. 2. @track: To track a private property’s value and rerender a component when it changes, decorate the property with @track. Tracked properties are also called private reactive properties. See Tracked Properties.
  • 9. 3. @wire: To read Salesforce data, Lightning web components use a reactive wire service. When the wire service provisions data, the component rerenders. See Use the Wire Service to Get Data and Call Apex Methods.
  • 10. Call Apex Methods from Lightning Web Components Import Apex Methods Functions in Javascript Call Functions Wire Service Call Imperatively Wire apex method to a property Wire apex method to a function Annotate Apex method with @AuraEnabled(cacheable=true)
  • 11. Call Apex method using wire service Syntax Usage