Blogs

  • Distribute JavaScript Code within a Lightning Web Component for Accessing URL Parameters

    In this article, we’ll craft a Lightning Web Component intended for sharing as a JavaScript library among other LWCs. We’ll create an LWC Component serving as a utility method to retrieve query parameters, demonstrated below: As seen in the provided code, creating a JavaScript file and a meta file is all that’s required for the…

    Read more…

  • Leveraging Custom Labels in Lightning Web Components – LWC

    Here’s a code snippet illustrating the utilization of custom labels in Lightning Web Components. Suppose we have custom labels named welcomeText and exitText. In the LWC’s JavaScript file, we need to adhere to the following syntax: Take note of how we imported the label and utilized ‘c.’ if there is no namespace.

    Read more…

  • Handling Events in Lightning Web Components – Publish-Subscribe

    It is very common to come across use case of communicating between Lightning Web Components. If you are not interested on code explanation and directly want to jump on live demo , check this playground. Establish Communication Among Enclosed Lightning Web Components This scenario is among the simplest and most common, where the parent LWC needs to…

    Read more…