Search code examples
extjsextjs4xtype

xtype instead of alias in class definition


Is there any difference between the two following class definition methods?

Ext.define("Test", {
  extend: "Ext.grid.Panel",
  xtype: "test"
});

Ext.define("Test", {
  extend: "Ext.grid.Panel",
  alias: "widget.test"
});

Solution

  • It is said that the alias is faster, but I don't think you will notice. I use alias when defining classes and xtype when creating objects, just a personal convention, so I don't get confused.