Skip to main content

Overview

useFetchManyComments returns a function that fetches a paginated list of comments. This is the underlying fetch function used by useEntityComments and useReplies. Use it directly when you need a custom comment list outside of those hooks.

Usage Example

Parameters

number
required
Page number (1-indexed). Must be greater than 0.
string
Filter to comments on a specific entity.
string
Filter to comments by a specific user.
string
Filter to replies of a specific parent comment.
string
Sort order: "createdAt" or "top". "new"/"old" are deprecated aliases for "createdAt" (removed in v8). A sortDir ("asc"/"desc") controls "createdAt" direction.
number
Results per page. Must be greater than 0.
string
Filter to comments within a specific source.
string | string[]
Populate related data. Accepted values: "user", "entity", "space", "parent".
string
Resolves each row’s embedded author reputation into a spaceReputation number. Accepts a space <uuid>, "none" (project-general bucket), or "context" (server-derived per row from the request context). Empty string, "general", and null are rejected. See Reputation.
boolean
When true, spaceReputation is the subtree sum (the space plus all its descendants). Only honored when spaceReputationId is an explicit <uuid>.

Returns

Comment[]
Comments for the current page. When spaceReputationId is set, each embedded author carries an added spaceReputation number. See Reputation.
boolean
Whether there are more pages to load.