In this Quick Take, we discuss how to communicate across the DOM using Custom Events. Creating a ToDo list will show us how we can take data from one component and pass it to another. In our ToDo list component, we take a look at how we can take the event and pass the body into an array.
Check out part 1 here: https://youtu.be/hIv22aTl3-g
Quick Take – Lightning Message Service in LWC and Aura: https://www.youtube.com/watch?v=TiTze4Qh4hc
Check out the code on github: https://github.com/schandlergarcia/lwc-custom-events
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 Custom Events: https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events
Connect with Salesforce Developers:
Website: https://www.developer.salesforce.com/
Facebook: https://www.facebook.com/salesforcedevs/
Twitter: https://www.twitter.com/salesforcedevs
LinkedIn: https://www.linkedin.com/showcase/salesforce-developers
Track: BeatFort – Rampant Sunrise
Music provided by Ninety9Lives
Stream / Free Download: 99l.tv/rampantsunriseYU