Skip to content

useComments

Comment system composable for collaborative review.

Import

typescript
const {
  comments,
  isLoading,
  fetchComments,
  addComment,
  updateComment,
  deleteComment,
} = useComments(projectId)

Parameters

ParameterTypeDescription
projectIdRef<string>Reactive project UUID

Methods

MethodParametersReturnsDescription
fetchCommentstargetId?: stringPromise<void>Load comments
addCommentbody: string, targetId: string, targetType: stringPromise<void>Add comment
updateCommentcommentId: string, body: stringPromise<void>Edit comment
deleteCommentcommentId: stringPromise<void>Delete comment

Source

app/composables/useComments.ts

Built with VitePress