I have created two interfaces reportsview and mainview (alias widget.main) : is it of good practice to go from the former to the latter (onClick) using this ExtJS logic :
var reportsViewInstance = Ext.getCmp('reportsview');
if (reportsViewInstance) {
reportsViewInstance.destroy();
}
var mainV2 = Ext.create('widget.main', {
renderTo: Ext.getBody(),
hideMode: 'visibility'
});
mainV2.show();
Or do i have to call the mainview using another logic for instance using getView()... ?
Thanks for this clarification