Skip to content

OptimisticOnErrorCtx

type OptimisticOnErrorCtx =
| {
action: "react" | "unreact";
activityId: string;
hook: "useReactions";
kind: string;
}
| {
action: "remove";
activityId: string;
hook: "useReactionList";
reactionId: string;
}
| {
action: "follow" | "unfollow";
hook: "useFollow";
source: {
group: string;
id: string;
};
target: {
group: string;
id: string;
};
}
| {
action: "markSeen" | "markRead";
hook: "useNotifications";
ids: string[] | null;
}
| {
action: "updateActivity";
activityId: string;
hook: "useFeed";
};

Action-specific context passed as the second arg of OptimisticOnError.