Today we will check how we can do error handling in Lightning Web Components (LWC). For this, we will create a utility method. Check my previous post for how we can share JavaScript code in Lightning Web Components and create a utility method. We will also use the Custom alert notification component to display the…
Tag: Share JS code
Share JavaScript Code in Lightning Web Components
Sometimes we need to share JavaScript code in Lightning Web Components (LWC). As code reusability is good feature and we can use same in LWC as well. To share JavaScript code between Lightning Web Components we need to create ES6 module. An ES6 module is a JavaScript file that explicitly exports variables or functions that…