(function() {

  var ScrollDown = React.createClass({
    getInitialState: function() {
      return { from: 0, length: 10 };
    },
    render: function() {
      var up = this.state.from;
      var to = this.state.from + this.state.length;
      return React.DOM.ul(null, _.range(up, to).map(function(i) {
        return React.DOM.li({ className: 'item', onClick: _.bind(this.onClick, this) }, 'item' + i);
      }, this));
    },
    onClick: function() {
      this.setState({ from: this.state.from + 1 });
    }
  });

  document.addEventListener('DOMContentLoaded', function() {
    React.renderComponent(ScrollDown(), document.getElementById('main'));
    new Mickey(document.getElementById('main')).init();
  });

})();

(function(React, Mickey) {

  var d = React.DOM;
  var mouse;

  var App = React.createClass({
    render: function() {
      return d.div(null, [
        d.h1(null, "foo"),
        ScrollDown({ length: 15 })
      ]);
    }
  });

  var ScrollDown = React.createClass({
    getInitialState: function() {
      return { from: 0 };
    },
    render: function() {
      var up = this.state.from;
      var to = this.state.from + this.props.length;
      var range = _.range(up, to);
      return d.div({ "data-nav-area": ".item,#go-up,#go-down" }, _.flatten([
        d.p({ id: "go-up", "data-nav-limit": "top", onClick: _.bind(this.scroll, this, -1) }, "go up"),
        d.ul(null, _.map(range, function(i) { return d.li({ className: 'item', key: i }, 'item' + i); })),
        d.p({ id: "go-down", "data-nav-limit": "bottom", onClick: _.bind(this.scroll, this, +1) }, "go down"),
      ]));
    },
    scroll: function(dir) {
      this.setState({ from: this.state.from + (dir || 1) });
    },
    componentDidUpdate: function() {
      mouse.update();
    }
  });

  document.addEventListener('DOMContentLoaded', function() {
    React.renderComponent(App(), document.getElementById('main'));
    mouse = new Mickey(document.getElementById('main'), { observer: _.noop }).init();
  });

})(window.React, window.Mickey);

improve react example