阅读背景:

如何将这两个函数组合成一个带有两个参数的函数?

来源:互联网 

I have two functions:

我有两个功能:

setCallModalFalse = (incomingFlag) => () => {
        if (incomingFlag === 'EmergencyCall') {
            this.setState({ callModal: false });
            this.props.navigation.navigate('EmergencyCall'); 
        } else {
            loggingService.debug('we are not going anywhere');
            this.setState({ callModal: false });
        }
    }
setBeepModalFalse = (incomingFlag) => () => {
            if (incomingFlag === 'PoliceIconPage') {
                this.setState({ beepModal: false });
                this.props.navigation.navigate('PoliceIconPage');
            } else {
                loggingService.debug('hey you pressed setbeepmodalfalse');
                this.setState({ beepModal: false });
            }
setCallModal



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: