AnsweredAssumed Answered

Dojo module | return variable vs dierct return of declare

Question asked by btfou on Nov 15, 2013
Latest reply on Nov 15, 2013 by btfou
When defining a module is there a good reason to define declare as a variable and then return the variable as opposed to returning declare directly? I see/do it both ways, and can't tell a difference. Is it the developers preference? I'd like to pick one and go with it across the board is why I ask. Thanks.

define(['dojo/declare', 'dojo/Evented'], function(declare, Evented) {   var someClass = declare([Evented], {     //blah blah   });   return someClass; });


OR

define(['dojo/declare', 'dojo/Evented'], function(declare, Evented) {   return declare([Evented], {     //blah blah   }); });

Outcomes