   useEffect ->
     id2dom[message._id] = ref.current
     -> delete id2dom[message._id]
-  , [message._id, ref.current]
+  , [message._id]
   ## Scroll to this message if it's been requested.
   useEffect ->
     if scrollToLater == message._id

      nav.on 'affixed.bs.affix', affixResize
      nav.on 'affixed-top.bs.affix', affixResize
      undefined
    , [ref.current]

    <nav className="contents" ref={ref}>
      <ul className="nav contents">

TableOfContentsID.displayName = 'TableOfContentsID'

TableOfContents = React.memo ({message, parent, index}) ->
  isRoot = not parent?  # should not differ between calls (for hook properties)
  ## Use canSee to properly fake non-superuser mode.
  visible = useTracker ->
    canSee message
