-
Sharing Javascript between salesforce lightning components
Hi all,
In a Lightning Component we have the notion of a JavaScript controller and a helper. We can use the helper to call code from the JavaScript controller that is shared between functions, so we can reduce redundancy in the code. This all works great.However, I was wondering if it is possible, and if so how, to share code between multiple Lightning Components. It doesn't behave like Apex where you can just reference other class.
Is there any hack for this?
Thanks
Log In to reply.
Popular Salesforce Blogs

Sales Cloud in Salesforce - All About it!
Every business needs various Salesforce products and services to support and manage its operations. Sales Cloud, Service Cloud, Marketing Cloud, Analytics Cloud, Community Cloud, App…

Why Do You Need Salesforce CRM Support in 2024?
In the fast-paced world of business, nurturing strong relationships with customers is the cornerstone of success. That's where Customer Relationship Management (CRM) platforms like Salesforce…

How to Avoid the Biggest Security Risks to Your Salesforce Org?
With companies leveraging platforms like Salesforce to manage their customer relationships, sales data, and marketing efforts, the security of such platforms is often overlooked as…
Popular Salesforce Videos
Mission Mangal | Build a Mars Communication Uplink | Salesforce Tutorials | Mini Project
In this video, you will learn to create a Mars Communication Uplink using Salesforce. We will create a communication system from Rovers on Mars. Interesting…
Creating Massive Junction Records with LWC | Salesforce Lightning Tutorial
Don't miss this new interchange session with Jorge Ortega and Alba Rivas! They'll discuss how to build an LWC that allows you to easily create…
How to Create Contact in Salesforce | Salesforce Contacts | Salesforce Tutorial
Contact in Salesforce represents the individual people associated with the business accounts in your organization or Contact records are used for individuals to store personal…