Skip to main content

LMFeedCreatePostContext

Introduction

The LMFeedCreatePostContext provides you with the data and functions to LMFeedCreatePost and its children. You can use the values stored within this context to create a custom UI for post creation components.

KeyTypeDescriptionOptional
postTextstring | null✔️
questionstring | null✔️
setQuestionText(text: string) => void✔️
setPostText(text: string) => void✔️
mediaListFile[]✔️
addMediaItem(event: React.ChangeEvent<HTMLInputElement>) => void✔️
removeMedia(index: number) => void✔️
clearMedia() => void✔️
mediaUploadModeLMFeedCreatePostMediaUploadMode✔️
changeMediaUploadMode(mode: LMFeedCreatePostMediaUploadMode) => void✔️
textFieldRefMutableRefObject<HTMLDivElement | null>✔️
containerRefMutableRefObject<HTMLDivElement | null>✔️
postFeed() => Promise<void>✔️
editPost() => Promise<void>✔️
ogTagOgTag | null✔️
openCreatePostDialogboolean✔️
setOpenCreatePostDialogReact.Dispatch<boolean>✔️
temporaryPostPost | null✔️
selectedTopicIdsstring[]✔️
setSelectedTopicIdsReact.Dispatch<string[]>✔️
preSelectedTopicsTopic[]✔️
setPreSelectedTopicsReact.Dispatch<Topic[]>✔️
showOGTagViewContainerboolean✔️
closeOGTagContainer() => void✔️
createPostComponentClickCustomCallbackComponentDelegatorListener✔️
addThumbnailReel(event: React.ChangeEvent<HTMLInputElement>) => void
addReel(event: React.ChangeEvent<HTMLInputElement>) => void
tempReelFile[]
tempReelThumbnailFile[]
removeThumbnailReel() => void
removeAddReel() => void
isAnonymousPostboolean
changeAnonymousPostStatus() => void

Example

For example implementation, checkout here