import domify from 'domify';


export default class View {
  constructor({app, model}) {
    this.app = app;
    this.model = model;
  }

  render() {
    const html = this.getHTML();
    const element = domify(html);
    this.mount(element);
    return element;
  }

  renderInto(target) {
    target.innerHTML = this.getHTML();
    const element = target.children[0];
    this.mount(element);
    return element;
  }

  getHTML() {
    return '<div></div>';
  }

  mount(element, sync=false) {
    this.element = element;
  }
}
import domify from 'domify';


export default class View {
  constructor({app}) {
    this.app = app;
  }

  render() {
    const html = this.getHTML();
    const element = domify(html);
    this.mount(element);
    return element;
  }

  renderInto(target) {
    target.innerHTML = this.getHTML();
    const element = target.children[0];
    this.mount(element);
    return element;
  }

  getHTML() {
    return '<div></div>';
  }

  mount(element, sync=false) {
    this.element = element;
  }
}
Remove model argument from View altogether
Remove model argument from View altogether
