Skip to content

useFeedActions

function useFeedActions<TCustom>(group, id): object;

Write-only feed actions. Inside a disabled provider both functions are no-ops resolving undefined (never rejecting) and enabled is false.

Type Parameter Default type
TCustom Record<string, unknown>
Parameter Type
group string
id string

object

addActivity: (a) => Promise<Activity<TCustom> | undefined>;
Parameter Type Description
a { custom?: TCustom; object: string; refs?: string[]; verb: string; } -
a.custom? TCustom -
a.object string -
a.refs? string[] Objects this activity points at, as type:id. Max 4. Resolved into the feed read’s objects sidecar — see useFeed.
a.verb string -

Promise<Activity<TCustom> | undefined>

deleteActivity: (activityId) => Promise<void | undefined>;
Parameter Type
activityId string

Promise<void | undefined>

enabled: boolean;