Overview
Returns a function to submit a content report on behalf of the authenticated user. Passtype: "comment" or type: "entity" when calling the hook — the returned function is pre-configured for that target type.
If the same target has already been reported, the user’s report is appended to the existing report record (the system deduplicates reports per-user). Reporting the same target twice has no additional effect.
Requires an authenticated user.
Usage Example
Parameters
The target type this hook instance will report against. Determines the shape of the returned function.
Returned Function
The hook returns eithercreateCommentReport or createEntityReport depending on the type argument. Both functions accept the same parameters:
The ID of the comment or entity being reported.
The reason for the report. Must be one of the following keys:
| Key | Label |
|---|---|
spam | It’s spam |
inappropriateContent | Contains inappropriate content |
harassment | It’s harassment or bullying |
misinformation | Spreads false information |
hateSpeech | Contains hate speech or symbols |
violence | Promotes violence or dangerous behavior |
illegalActivity | Promotes illegal activity |
selfHarm | Promotes self-harm or suicide |
other | Other |
Optional free-text elaboration on the reason.
Returns
The returned function returnsPromise<void>. It resolves when the report is accepted (whether created or appended to an existing one).
Notes
- If the target has already been reported by this user, the server returns
200with codereport/already-reportedwithout error. The hook function resolves normally in this case. - Reports are scoped to the space the content belongs to, enabling space moderators to action them. See
useFetchModeratedReports.

