UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

21 lines (19 loc) 673 B
import { createCommunityMemberEventSubscriber } from './utils'; /** * ```js * import { onCommunityJoined } from '@amityco/ts-sdk-react-native' * const dispose = onCommunityJoined((community, member) => { * // ... * }) * ``` * * Fired when a {@link Amity.Community} has been joined * * @param callback The function to call when the event was fired * @returns an {@link Amity.Unsubscriber} function to stop listening * * @category Community Events */ export const onCommunityJoined = ( callback: (community: Amity.InternalCommunity, member: Amity.Membership<'community'>[]) => void, ) => createCommunityMemberEventSubscriber('community.joined', callback);