Overview
useFetchComment returns a function that fetches a single comment by ID. The response wraps the comment in a { comment } object to allow future expansion of the response shape.
Usage Example
Parameters
string
required
The ID of the comment to fetch.
string | string[]
Populate related data. Accepted values:
"user", "entity", "space", "parent".string
Optional. Resolves the embedded author’s reputation into a
spaceReputation number. Accepts a space <uuid>, "none" (project-general bucket), or "context" (server-derived from the request context). Empty string, "general", and null are rejected. See Reputation.boolean
Optional. When
true, spaceReputation is the subtree sum (the space plus all its descendants). Only honored when spaceReputationId is an explicit <uuid>.Returns
Comment
The fetched comment. When
"parent" is included, comment.parentComment is populated. When spaceReputationId is set, the embedded author carries an added spaceReputation number. See Comment data model and Reputation.
