Overview
useEntityComments is a lower-level hook that fetches and manages a paginated comment tree for a given entity ID. It is used internally by CommentSectionProvider. Use it directly when you need comment tree management without the full provider.
For most use cases, use
CommentSectionProvider + useCommentSection instead. See Comment Section.Usage Example
Props
Initial sort:
"createdAt", "top", or "controversial". Default: "createdAt". "new"/"old" are deprecated aliases for "createdAt" (removed in v8).Populate related data. Accepted values:
"user", "entity", "space", "parent", "grants". On a comment feed, "parent" is accepted but not resolved — parentComment is populated only by the two single-comment reads.Return Values
Inserts comments into the tree. Pass
newlyAdded: true for freshly submitted comments.
