     dataSelector: React.PropTypes.string.isRequired
 
   componentWillMount: ->
-    @props.windowImpl.addEventListener('scroll', @onScroll)
     @calculateScroll()
 
-  componentWillUnmount: ->
-    @props.windowImpl.removeEventListener('scroll', @onScroll)
-
-  onScroll: _.debounce( ->
+  onPageScroll: _.debounce( ->
     @calculateScroll()
   , 100)
 

React = require 'react/addons'
_ = require 'underscore'

# A component that accepts a dom selector that matches portions of the document
#

ScrollSpy = React.createClass

  getInitialState: -> {}
  mixins: [ScrollListenerMixin]

  getDefaultProps: ->
    windowImpl: window
