Skip to content

useReplies

function useReplies(activityId, commentId): object;

Replies under one comment. Same shape as useComments. add calls activity(activityId).comments.add({ text, parentId: commentId }).

Parameter Type
activityId string
commentId string

object

add: (text) => Promise<void> = thread.add;
Parameter Type
text string

Promise<void>

enabled: boolean = thread.enabled;
error: Error | null = thread.error;
hasNext: boolean = thread.hasNext;
isLoading: boolean = thread.isLoading;
loadNext: () => Promise<void> = thread.loadNext;

Promise<void>

replies: Comment[] = thread.rows;

The network error after the optimistic row has been removed.