How it works...

The Lightning JavaScript Helper is a client-side controller containing specialized search functions that are being called from our Lightning JavaScript Controller. In the context of the framework for our "Search First Before You Create" Lightning Component, Lightning JavaScript helpers allow the following, as described by Salesforce:

"Put functions that you want to reuse in the component's helper. Helper functions also enable specialization of tasks, such as processing data and firing server-side actions.

A helper function can be called from any JavaScript code in a component's bundle, such as from a client-side controller or renderer.

Helper functions are similar to client-side controller functions in shape, surrounded by parentheses and curly braces to denote a JavaScript object in object-literal notation containing a map of name-value pairs. A helper function can pass in any arguments required by the function, such as the component it belongs to, a callback, or any other objects."
Reference:

 
Lightning Components Developer Guide: Sharing JavaScript Code in a Component Bundle

 https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_helper.htm
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset