Salesforce Lightning Component framework provides the ltng:require tag, which allows you to add one or more JavaScript files referenced from Salesforce static resources to Lightning Components. When you use the ltng:require tag, the JavaScript loaded has the ability to manipulate the DOM within the component's boundaries.
In this section, we will take a third-party JavaScript library called flipclock.js to build a Lightning Component that displays a flipclock. Note that flipclock.js is completely compatible with locker and hence we do not need any modifications to the original library source code. Later, in the Creating a Locker Service-compliant JavaScript bundle using webpack section, we will take an example where libraries are not compatible with locker and understand the general process...