   _onMessageStoreUpdate: (messageId) ->
     console.log messageStore.getMessage(messageId)
 
-  _onThreadStoreUpdate: (threadId) ->
-    console.log threadStore.getTree(threadId)
+  _onThreadStoreUpdate: (threadIds) ->
+    if 'threadNames' not of @state
+      threadNames = threadStore.getThreadNames()
+      @setState {threadNames}
 
   componentDidMount: ->
     @unsubscribeFromUserSessionStore = userSessionStore.listen(@_onUserSessionUpdate)

          <h1>Welcome</h1>
        </div>
        Hello {if @state.user then @state.user.username else "World"}!
      </div>
    )



  componentWillUnmount: ->
    @unsubscribeFromUserSessionStore()
    @unsubscribeFromThreadStore()

  _renderThreadNames: ->
    names = []
    for thread, object of @state.threadNames
      names.push(<div key={thread}>{object.displayName}</div>)
    return names

  render: ->
    return (
