Posted in Salesforce

Salesforce Lightning : A better way to handle component.find return value

I have always seen Salesforce Aura Component developers using multiple checks before fetching data from component.find method. It is because, it does return three types of results:

  1. undefined – when there are no items found on the DOM
  2. Single component – when there are only one item found in the DOM
  3. Array of components – when there are more than an item found in the DOM
Continue reading “Salesforce Lightning : A better way to handle component.find return value”
Posted in Salesforce

Salesforce Lightning : Device Based Behavior

Salesforce Lightning Components are a great way to build modern intuitive development. However, when there is a need for the component or the application to behave differently in different devices, we can make use of $Browser global value provider.

Continue reading “Salesforce Lightning : Device Based Behavior”