 
   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

        </span>
      </span>
    </span>

  handlePageExit: (e) ->
    unless @state.writes is 0
      e.returnValue = @props.confirmation
      @props.confirmation
