Skip to main content

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.
If the comment author is block-edged with the signed-in caller, in either direction, this returns 404 with comment/not-found — identical to a comment that does not exist. An embedded parentComment is nulled under the same rule. Requires the moderation bundle.

Usage Example

Parameters

string
required
The ID of the comment to fetch.
string | string[]
Populate related data. Accepted values: "user", "entity", "space", "parent", "grants".

Returns

Comment
The fetched comment. When "parent" is included, comment.parentComment is populated. When spaceReputation is requested, the embedded author carries an added spaceReputation number. See Comment data model and Reputation.