Sanity Library Reference Docs
    Preparing search index...

    Variable getCommentThreadsStateConst Beta

    getCommentThreadsState: (
        instance: SanityInstance,
        options: CommentsOptions,
    ) => StateSource<CommentThread[] | undefined> = ...

    Threads on a document, newest thread first, each with its replies oldest first.

    A thread's status and fieldPath come from its first comment, so filtering by either selects whole threads rather than individual replies.

    Type declaration

    Comments have moved to the organization collaboration API. Import from @sanity/sdk/collaboration; this add-on dataset API is removed in the next major.