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.
Property | Type | Optional |
---|---|---|
post | Post | null | No |
topics | Record<string, Topic> | null | No |
users | Record<string, User> | null | No |
widgets | Record<string, any> | null | No |
getNextPage | () => Promise<void> | Yes |
loadNextPage | boolean | Yes |
replies | Reply[] | Yes |
deletePost | (id: string) => Promise<void> | Yes |
pinPost | (id: string) => Promise<void> | Yes |
addNewComment | (comment: Reply, userMap: Record<string, User>) => void | Yes |
removeAComment | (id: string) => void | Yes |
updateReplyOnPostReply | (id: string) => void | Yes |
updateReply | (comment: Reply, usersMap: Record<string, User>) => void | Yes |
likeReply | (id: string) => void | Yes |
likePost | (id: string) => void | Yes |
postComponentClickCustomCallback | (event: React.MouseEvent<HTMLDivElement>) => void | Yes |
clickNavigator | ClickNavigator | Yes |
hidePost | (postId: string) => Promise<void> | Yes |
Example
For example implementation, checkout here