Boost LWC with Data Attributes ⚡
Learn how to use data attributes to add custom data to elements in Lightning Web Components for enhanced functionality.

Salesforce Developers
50.6K views • Nov 11, 2020

About this video
Data attributes give you the ability to specify custom attributes on any elements with the HTML of your Lightning Web Component. In this quick take, we will take a list of contacts and understand how data attributes can help us identify the clicked element and act on the data.
Check out the code on github: https://github.com/schandlergarcia/lwc-element-explorer
Take the “Learn to work with Javascript” Trail on Trailhead: https://trailhead.salesforce.com/en/content/learn/trails/learn-to-work-with-javascript
Learn more about Data Attributes: https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
Learn more about Filters in Javascript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
Track: BeatFort - Rampant Sunrise
Music provided by Ninety9Lives
Stream / Free Download: 99l.tv/rampantsunriseYU
Check out the code on github: https://github.com/schandlergarcia/lwc-element-explorer
Take the “Learn to work with Javascript” Trail on Trailhead: https://trailhead.salesforce.com/en/content/learn/trails/learn-to-work-with-javascript
Learn more about Data Attributes: https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
Learn more about Filters in Javascript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
Track: BeatFort - Rampant Sunrise
Music provided by Ninety9Lives
Stream / Free Download: 99l.tv/rampantsunriseYU
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
50.6K
Likes
217
Duration
7:43
Published
Nov 11, 2020
User Reviews
4.1
(10) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
Trending Now