title: Listen for scroll up / down?
body: <p>I'm building an app (ES6) and I'm curious what is the 'correct' way to catch scroll up / down events? </p>
  
  <p>I tried (npm) installing react-scroll-listener but I couldn't get it to work with my ES6 class.</p>
  
  <p>Basically I want: if scroll up, do this; if scroll down, do something else.</p>
  
  <pre><code>import React from 'react';
  import config from '../config';
  import StaticImageList from '../Common/StaticImageList';
  import ScrollListener from 'react-scroll-listener';
  
  class Album extends React.Component {
      constructor(props){
        super(props);
  
      }
      myScrollStartHandler(){
          console.log('Scroll start');
  
      }
      myScrollEndHandler(){
          console.log('Scroll end 300ms(default)');
      }
      componentDidMount(){
        scrollListener.addScrollHandler('body', myScrollStartHandler, myScrollEndHandler );
      }
      render(){
        return &lt;StaticImageList /&gt;;
      }
  };
  
  export default Album; 
  </code></pre>