Skip to main content

Overview

useFetchEntityReactions returns a function that fetches individual reaction records for an entity. Use this to show “who reacted” lists, optionally filtered by a specific reaction type.

Usage Example

Parameters

string
required
The entity to fetch reactions for.
number
required
Page number (1-indexed).
number
Results per page. Default: 20.
ReactionType
Filter to a specific reaction type.
"asc" | "desc"
Sort direction by creation date. Default: "desc".
string
Resolves each reactor’s reputation into a spaceReputation number on the embedded user. 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
When true, spaceReputation is the subtree sum (the space plus all its descendants). Only honored when spaceReputationId is an explicit <uuid>.

Returns

Reaction[]
Array of reaction records. Each includes id, userId, reactionType, targetId, targetType, createdAt. The user field is populated when user data is available; when spaceReputationId is set it carries an added spaceReputation number. See Reputation.
PaginationMetadata
Pagination metadata for the result set.
  • page — current page number
  • pageSize — number of results returned
  • totalItems — total number of reactions matching the query
  • totalPages — total number of pages
  • hasMore — whether additional pages are available