Overview
useCreateComment returns a function that creates a new comment. Use it directly for low-level comment creation. Inside a CommentSectionProvider, prefer createComment from useCommentSection — it adds optimistic UI and manages the comment tree automatically.
Requires an authenticated user.
Usage Example
Parameters
The entity to comment on.
Text content of the comment. Required if
gif is not provided.GIF attachment. Required if
content is not provided.ID of the parent comment for replies.
Your own ID to associate with this comment.
ID of a comment being referenced/quoted in this comment.
Users or spaces mentioned in the comment content.
Arbitrary attachment metadata.
Arbitrary project-specific data.
Returns
The newly created comment. See Comment data model.

