Q:

Backbone: properties in ECMAScript 6

I'm searching for a good ECMAScript 6 equivalent of the following Backbone code:
var MyModel = Backbone.Model.extend({});

var MyCollection = Backbone.Collection.extend({
    model: MyModel
});

This pattern is widely used in Backbone models, views and collections. Can I do better than the code below (e.g. by creating a method named "model")?
export class MyModel extends Backbone.Model {}

export class MyCollection extends Backbone.Collection {
    constructor() {
        super({model: MyModel});
    }
}

A:

I'd use a getter:
export class MyModel extends Backbone.Model {}

export class MyCollection extends Backbone.Collection {
  get model() {
    return MyModel;
  }
}

