Sanity Library Reference Docs
    Preparing search index...

    Variable resolveCommentsConst Beta

    resolveComments: (
        instance: SanityInstance,
        options: ResolveCommentsOptions,
    ) => Promise<Comment[]> = ...

    Waits for a document's comments to load.

    Holds a subscriber only while resolving, so a component that suspends on this and then errors before mounting does not strand the list. Throw the promise for Suspense, then read through getCommentsState.

    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.