UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

20 lines (18 loc) 608 B
import { createCommunityEventSubscriber } from './utils'; /** * ```js * import { onCommunityCreated } from '@amityco/ts-sdk-react-native' * const dispose = onCommunityCreated(community => { * // ... * }) * ``` * * Fired when a {@link Amity.Community} have been created * * @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 onCommunityCreated = (callback: Amity.Listener<Amity.InternalCommunity>) => createCommunityEventSubscriber('community.created', callback);