View Full Version : Sencha Architect Generated Code: When do I need to use Ext.applyIf, init vs config?

21 May 2012, 11:54 PM
I noticed that in the docs, config object are used, many use Ext.create rather Ext.define avoiding the need to even use config object. But when I look at code generated by Sencha Architect, its quite different

Ext.define('tryExtArchitect.view.AppViewport', {
extend: 'Ext.container.Viewport',
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [

I could just use

config: {
items: [...]

too right? Which is correct or better? Why?

25 May 2012, 11:42 AM
The config object is not widely supported in Ext JS 4 like it is in ST2.