useReactionList
function useReactionList(activityId, opts?): object;Loads the reaction list for an activity (the “who reacted” list — distinct from
useReactions, which is the optimistic like/unlike counter). Paginates via loadNext;
remove(reactionId) deletes a reaction by id with an optimistic drop + rollback.
Inert (empty list, no network, enabled: false) inside a disabled provider.
remove(reactionId) rejects after rolling back — see the file header.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
activityId |
string |
opts? |
{ kind?: string; } |
opts.kind? |
string |
Returns
Section titled “Returns”object
enabled
Section titled “enabled”enabled: boolean;error: Error | null;hasNext
Section titled “hasNext”hasNext: boolean;isLoading
Section titled “isLoading”isLoading: boolean;loadNext
Section titled “loadNext”loadNext: () => Promise<void>;Returns
Section titled “Returns”Promise<void>
reactions
Section titled “reactions”reactions: Reaction[];refresh
Section titled “refresh”refresh: () => Promise<void>;Returns
Section titled “Returns”Promise<void>
remove
Section titled “remove”remove: (reactionId, opts?) => Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
reactionId |
string |
opts? |
{ onError?: OptimisticOnError; } |
opts.onError? |
OptimisticOnError |
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”The network error after the optimistic drop has been rolled back.