   constructor: (props) ->
     super props
 
+    @eventId = "profile-page-#{osu.uuid()}"
     @tabs = React.createRef()
     @pages = React.createRef()
     @state = JSON.parse(props.container.dataset.profilePageState ? null)



  componentDidMount: =>
    $.subscribe 'user:update.profilePage', @userUpdate
    $.subscribe 'user:page:update.profilePage', @userPageUpdate
    $.subscribe 'profile:showMore.profilePage', @showMore
    $.subscribe 'profile:page:jump.profilePage', @pageJump
    $(window).on 'scroll.profilePage', @pageScan
    $(document).on 'turbolinks:before-cache.profilePage', @saveStateToContainer

    $(@pages.current).sortable
      cursor: 'move'



  componentWillUnmount: =>
    $.unsubscribe ".#{@eventId}"
    $(window).off ".#{@eventId}"

    for sortable in [@pages, @tabs]
      $(sortable.current).sortable 'destroy'
