Reads a document's comments and keeps them up to date.
Comments are shared with the Studio: they live in the project's comments
dataset, so a thread started here shows up there and the other way round. The
list is flat, replies included; reach for useCommentThreads to read it
grouped.
Suspends until the comments have loaded. Switching document or filter is a
transition, so the previous list stays on screen and isPending goes true
rather than the component suspending again.
Comments have moved to the organization collaboration API. Import useComments
from @sanity/sdk-react/collaboration instead; it takes the same options and returns the
same flat list. This add-on dataset hook is removed in the next major.
Reads a document's comments and keeps them up to date.
Comments are shared with the Studio: they live in the project's comments dataset, so a thread started here shows up there and the other way round. The list is flat, replies included; reach for useCommentThreads to read it grouped.
Suspends until the comments have loaded. Switching document or filter is a transition, so the previous list stays on screen and
isPendinggoes true rather than the component suspending again.