SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function useCommentThread

    • A comment's thread, kept current: its text, author, replies and resolved state.

      Parameters

      • comment: IComment | null

        The comment, or null for none (a draft that has not been posted).

      Returns CommentThread | null

      The thread, or null when there is no comment.

      The object keeps its identity until the comment's content, replies or resolved state changes, or the comment is deleted.

      const thread = useCommentThread(comment);
      if (!thread || thread.deleted) return null;
      return <p>{thread.author?.getDisplayName()}: {thread.content} ({thread.replies.length} replies)</p>;