 
   componentWillUnmount: ->
     @props.target.stopListening 'change', @handleTargetChange
+    removeEventListener 'beforeunload', @handlePageExit
 
   handleTargetChange: ->
     setTimeout => # TODO: I have no idea why this is necessary.


  componentDidMount: ->
    @props.target.listen 'change', @handleTargetChange

  componentWillReceiveProps: (nextProps) ->
    @props.target.stopListening 'change', @handleTargetChange


  getDefaultProps: ->
    target: apiClient
    confirmation: 'Some data hasn’t finished syncing, please wait just a second!'
    style:
      background: 'rgba(0, 0, 0, 0.5)'
      borderRadius: '0 0 0.3em 0.3em'
