React Activity Feed
Edit page
Introduction
Top Level Components
ActivityFlat feedPropertiesBasic usageWith custom ActivityFooterNotificationNotification dropdownNotification feedSingle postStatus update form
UI Components
Layout Components
Streami18n
Composition Components
Readme

FlatFeed

This component should be a child of <StreamApp/> component.

Properties

Activity
string | number | boolean | ReactElement<PropsWithElementAttributes<{ activity: EnrichedActivity<UT, AT, CT, RT, CRT>; Card?: string | number | boolean | ReactElement<PropsWithElementAttributes<{ alt?: string | undefined; handleClose?: ((e: SyntheticEvent<Element, Event>) => void) | undefined; image?: string | ... 1...
< UT extends DefaultUT = DefaultUT, AT extends DefaultAT = DefaultAT, CT extends UR = UR, RT extends UR = UR, CRT extends UR = UR >({ Header = DefaultActivityHeader, HeaderRight, Content = DefaultActivityContent, Footer, Card = DefaultCard, activity, icon, onClickHashtag, onClickMention, onClickUser, Repost = DefaultRepost, userId, feedGroup, className, style, }: ActivityProps<UT, AT, CT, RT, CRT>) => ( <div className={classNames('raf-activity', className)} style={style}> {smartRender<ActivityHeaderProps<UT, AT>>(Header, { HeaderRight, icon, activity, onClickUser })} {smartRender<ActivityContentProps<UT, AT, CT, RT, CRT>>(Content, { activity, Content, Card, feedGroup, Footer, Header, HeaderRight, icon, onClickHashtag, onClickMention, onClickUser, Repost, userId, })} {smartRender<ActivityFooterProps<UT, AT, CT, RT, CRT>>(Footer, { activity, feedGroup, userId })} </div> )
LoadingIndicator
string | number | boolean | ReactElement<LoadingIndicatorProps, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => Component<any, any, any>)> | ComponentClass<...> | FunctionComponent<...> | null | undefined
Notifier
string | number | boolean | ReactElement<PropsWithElementAttributes<{ adds?: any; deletes?: string[] | undefined; labelFunction?: LabelFunction | undefined; labelPlural?: string | undefined; labelSingle?: string | undefined; onClick?: ((event: MouseEvent<...>) => void) | undefined; }, HTMLButtonElement>, string | .....
(props: NewActivitiesNotificationProps) => ( <NewActivitiesNotification labelPlural="activities" labelSingle="activity" {...props} /> )
Paginator
string | number | boolean | ReactElement<LoadMorePaginatorProps, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => Component<any, any, any>)> | ComponentClass<...> | FunctionComponent<...> | null | undefined
({ LoadMoreButton = DefaultLoadMoreButton, children, reverse, hasNextPage, refreshing, loadNextPage, }: LoadMorePaginatorProps) => ( <> {!reverse && children} {hasNextPage && smartRender<LoadMoreButtonProps>(LoadMoreButton, { refreshing, onClick: loadNextPage })} {reverse && children} </> )
Placeholder
string | number | boolean | ReactElement<PropsWithElementAttributes<{ text?: string | undefined; }, HTMLDivElement>, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => Component<...>)> | ComponentClass<...> | FunctionComponent<...> | null | undefined
({ text, className, style }: FeedPlaceholderProps) => { const { t } = useTranslationContext(); return ( <div className={classNames('raf-feed-placeholder', className)} style={style}> <p>{text || t('No data to display...')}</p> </div> ); }
options
GetFeedOptions | undefined
feedGroup
string
timeline
userId
string | undefined
analyticsLocation
string | undefined
doActivityDeleteRequest
DeleteRequestFn | undefined
doChildReactionAddRequest
((kind: string, reaction: Reaction<RT>, data?: CRT | undefined, options?: ReactionAddChildOptions | undefined) => Promise<ReactionAPIResponse<CRT>>) | undefined
doChildReactionDeleteRequest
DeleteRequestFn | undefined
doFeedRequest
((client: StreamClient<UT, AT, CT, RT, CRT, PT>, feedGroup: string, userId?: string | undefined, options?: GetFeedOptions | undefined) => Promise<FeedAPIResponse<UT, AT, CT, RT, CRT>>) | undefined
doReactionAddRequest
((kind: string, activity: Activity<AT>, data?: RT | undefined, options?: ReactionAddOptions | undefined) => Promise<ReactionAPIResponse<RT>>) | undefined
doReactionDeleteRequest
DeleteRequestFn | undefined
doReactionsFilterRequest
((options: ReactionFilterConditions) => Promise<ReactionFilterAPIResponse<RT, CRT, AT, UT>>) | undefined
notify
boolean | undefined

Basic usage

With custom ActivityFooter