Skip to main content

LMFeedPostContext

Introduction

The LMFeedPostContext stores details regarding an individual post object. Each of the post is wrapped in this context, and can be used to access the particular post. You can use the values stored in this context to create a custom UI for an individual post object.

PropertyTypeOptional
postPost | nullNo
topicsRecord<string, Topic> | nullNo
usersRecord<string, User> | nullNo
widgetsRecord<string, any> | nullNo
getNextPage() => Promise<void>Yes
loadNextPagebooleanYes
repliesReply[]Yes
deletePost(id: string) => Promise<void>Yes
pinPost(id: string) => Promise<void>Yes
addNewComment(comment: Reply, userMap: Record<string, User>) => voidYes
removeAComment(id: string) => voidYes
updateReplyOnPostReply(id: string) => voidYes
updateReply(comment: Reply, usersMap: Record<string, User>) => voidYes
likeReply(id: string) => voidYes
likePost(id: string) => voidYes
postComponentClickCustomCallback(event: React.MouseEvent<HTMLDivElement>) => voidYes
clickNavigatorClickNavigatorYes
hidePost(postId: string) => Promise<void>Yes

Example

For example implementation, checkout here