import Resize from './Resize';

let AutoResize = Base => class extends Resize(Base) {
  constructor (...args) {
    super(...args);

    this.on('resize', (w, h) => {
      this.width = w;
      this.height = h;

      this.render();
    });
  }
};

export default AutoResize;

import Resize from './Resize';
import InitSize from './InitSize';

let AutoResize = Base => class extends Resize(SizeInit(Base)) {
  constructor (...args) {
    super(...args);

    this.on('resize', (w, h) => {
      this.width = w;
      this.height = h;

      this.render();
    });
  }
};

export default AutoResize;

Make Resize mixin extend InitSize mixin
Make Resize mixin extend InitSize mixin

This is because Resize updates this.width and this.height, which means that
conceptually it must depend on InitSize (which initializes those properties in
the constructor).
