showing results for - "back press subscriptions i is not a function react native"
Elizabeth
15 May 2016
1componentDidMount() {
2        this.interval = setInterval(() => this.setState({ time: this.state.time + 1 }), 1000 * 60);
3        this.handler = BackHandler.addEventListener('hardwareBackPress', () => {return true})
4    }
5
6    componentWillUnmount() {
7        clearInterval(this.interval)
8        this.handler.remove()
9        BackHandler.addEventListener('hardwareBackPress', () => {return false})
10    }