Skip to main content
useCommentThread(type, id, { sort?, perPage?, client? }) is the store both batteries-included threads run on.
  • React spreads state into the return value (comments, status, …).
  • Vue nests it under state (state.comments, state.status).
type is the commentable alias. id is the record key.

State

A comment held for moderation is decorated with pending: true (pending ?? !is_approved) so you can show it to its author while it waits. comment.can.update and comment.can.delete mirror CommentPolicy. comment.can.pin is true for parent comments when the current user is a moderator and pins are enabled.

Actions

All return promises. Writes apply optimistically and roll back if the request fails. The result also includes store (ThreadStore) if you need subscribeToThread() for Reverb.

CommentifyClient

Methods: listComments, createComment, updateComment, deleteComment, toggleLike, report, ui, uploadMedia, pinComment, unpinComment, previewMarkdown, searchUsers, listReplies. createComment accepts optional { guest_name, guest_email }. Guest likes/reports do not need extra fields — the server keys on IP + user agent.

Errors

Failures throw ApiError with status, message, errors, and a stable code. Switch on code, not the message: See API for request shapes.
Last modified on September 12, 2026