Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Modifying DOM Elements Managed by External Libraries

You can use different libraries, such as a charting library, to create and manage DOM elements. You don’t have to modify these DOM elements within the render event handler or a renderer because they are managed by the external library.

A render event handler or a renderer are used only to customize DOM elements created and managed by the Aura Components programming model.

To use external libraries, use <ltng:require>. The afterScriptsLoaded attribute enables you to interact with the DOM after your libraries have loaded and the DOM is ready. <ltng:require> tag orchestrates the loading of your library of choice with the rendering cycle of the Aura Components programming model to ensure that everything works in concert.