title: Creating a scroll position indicator in React
body: <p>I'm trying to code a scroll indicator progress bar in React. I have it working with Jquery but would like to know how to do it with pure Javascript.</p>
  
  <pre><code>  componentDidMount() {
      window.addEventListener('scroll', this.handleScroll);
    }
  
    handleScroll() {
      var winHeight = $(window).height(),
        docHeight = $(document).height(),
        value = $(window).scrollTop(),
        max, percent;
  
      max = docHeight - winHeight;
      percent = (value / max) * 100;
      this.props.updatePercent(percent);
    }
  </code></pre>
  
  <p>Also, should I bother doing this in pure Javascript? I've been told that Jquery should not be used used in React.</p>