UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

20 lines (18 loc) 565 B
import { createUserEventSubscriber } from './utils'; /** * ```js * import { onUserFetched } from '@amityco/ts-sdk-react-native' * const dispose = onUserFetched(user => { * // ... * }) * ``` * * Fired when a {@link Amity.InternalUser} has been fetched * * @param callback The function to call when the event was fired * @returns an {@link Amity.Unsubscriber} function to stop listening * * @category User Events */ export const onUserFetched = (callback: Amity.Listener<Amity.InternalUser>) => createUserEventSubscriber('user.fetched', callback);