TypeError: _backPressSubscriptions[i] is not a function. (In '_backPressSubscriptions[i]()', '_backPressSubscriptions[i]' is undefined) code example

Example: back press subscriptions i is not a function react native

componentDidMount() {
        this.interval = setInterval(() => this.setState({ time: this.state.time + 1 }), 1000 * 60);
        this.handler = BackHandler.addEventListener('hardwareBackPress', () => {return true})
    }

    componentWillUnmount() {
        clearInterval(this.interval)
        this.handler.remove()
        BackHandler.addEventListener('hardwareBackPress', () => {return false})
    }