define([
], function() {
  return {
    componentDidMount: function() {
      this._boundForceUpdate = this.forceUpdate.bind(this, null);
      this.props.collection.on("all", this._boundForceUpdate, this);
    },
    componentWillUnmount: function() {
      this.props.collection.off("all", this._boundForceUpdate);
    }
  };
});

define([
], function() {
  return {
    componentDidMount: function() {
      this._boundForceUpdate = this.forceUpdate.bind(this, null);
      this.getBackboneObject().on("all", this._boundForceUpdate, this);
    },
    componentWillUnmount: function() {
      this.getBackboneObject().off("all", this._boundForceUpdate);
    },
    getBackboneObject: function() {
      return this.props.collection || this.props.model;
    }
  };
});

Extend BackboneMixin to support models and collections