jeudi 2 avril 2020

Can't we use plain Ember Objects in place of Ember Mixins?

If Ember.Mixin.create() is itself extended from Ember.Object then why don't we mix objects created by Ember.Object.create() instead of Ember.Mixin.create()?

Why dont we use Ember objects like this

let TestObject = Ember.Object.create({
  list: []
}); 

let TestComponent = Ember.Component.extend(TestObject, {});

Instead of using a Ember mixin like below

let TestMixin = Ember.Mixin.create({
      list: []
    }); 

let TestComponent = Ember.Component.extend(TestMixin, {});



Aucun commentaire:

Enregistrer un commentaire