Chapter 9.  Magento 2 JavaScript

"The only place success comes before work is in the dictionary." - Vince Lombardi.

Magento 2 adopted a complete framework for JavaScript solutions in order to provide greater performance and uncoupling modules aiming for higher reusability of codes.

Good practice and current techniques were also employed with the objective of facilitating the development of solutions in the infrastructure that Magento 2 provides both to its users and to its developers.

In this chapter, we will cover:

  • Magento 2 JavaScript structure
  • Initializing and locating JavaScript component
  • Magento jQuery widgets
  • Creating a jCarousel component for the Promo module

Magento 2 JavaScript structure

The use of JavaScript in web application projects has ...

Get Magento 2 Theme Design - Second Edition 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.