import { useEffect } from 'react';
import { NativeEventEmitter, NativeModules } from 'react-native';
export const useEventListener = (eventName, listener) => {
  useEffect(() => {
    const eventEmitter = new NativeEventEmitter(NativeModules.SyrfClient);
    const eventListener = eventEmitter.addListener(eventName, listener);
    return () => {
      eventListener.remove();
    };
  }, [eventName, listener]);
};
//# sourceMappingURL=useEventListener.js.map