Skip to main content

useLMPostReply

Introduction

The useLMPostReply hook is a custom hook that allows you to manage and handle replies to posts within the LikeMinds feed. It provides an easy-to-use interface for posting replies, managing reply state, and integrating with the LikeMinds API. This hook simplifies the process of interacting with post replies, making it easier to build responsive and interactive features in your application.

This expects two arguments postId and commentId(optional).

Here's the updated table markdown with the modifications applied as per your instructions:

PropertyTypeDescription
replyTextstringThe text of the reply.
setReplyText(text: string) => voidFunction to set the reply text.
textFieldRefReact.MutableRefObject<HTMLDivElement | null>Reference to the text field element.
containerRefReact.MutableRefObject<HTMLDivElement | null>Reference to the container element.
postReply(reply: Reply) => voidFunction to post a reply.
postComment() => voidFunction to post a comment.
editComment() => voidFunction to edit a comment.

Example

For example implementation, checkout here