Storable actions

In Chapter 3Lightning Component Building Blocks, you learned that, to make a call to a server (using the Apex method) from the Lightning Component client-side controller/helper function, we can enqueue an action, using the following code snippet:

var action = component.get("c.getResults");action.setCallback(this, function(response) {  // handle response};$A.enqueueAction(action);

In the code snippet, whenever an action is invoked via events (onInit, click, or custom events), the client makes a call to get the latest data or performs data manipulation (DML), such as the creating, deleting, or editing of records.

This framework provides the ability to mark an action as storable. To mark an action as storable, the code snippet ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.