What is the purpose of Ext.require

I am trying to migrate an application from Sencha-Touch 1 to Sencha-Touch 2, and I cannot figure out exactly what the purpose is for the following code snippet:

Ext.require([ 'Ext.XTemplate', 'Ext.Panel', 'Ext.Button', 'Ext.List', 'Ext.Carousel', 'Ext.NestedList' ]); 

Can someone help me here?

thanks

+6
source share
1 answer

Used by the class system when dynamic loading is enabled in the class system. Basically, this suggests that these are the components that will be used in your application.

It also means that the SDK Tools can determine which classes were used in your application and use them only when compiling and shortening your application into 1 file - since in most cases you will not use every part of the framework.

Further information on the class system can be found here and information on SDK tools and building.

+8
source

Source: https://habr.com/ru/post/908566/


All Articles