브로드 캐스트 등록 : addListener는 이름 notification_logout 다음에 리스너 콜백 이벤트를 브로드 캐스트합니다.
componentDidMount () : void { this.logoutListener = DeviceEventEmitter.addListener ( 'notification_logout', () => { console.log ( "notification_logout") Actions.replace ( 'login', {type : 0}) }); }
모니터 제거 :
componentWillUnmount () : void { this.logoutListener.remove () }
방송 통화 :
DeviceEventEmitter.emit ( 'notification_logout', null);