Langganan Back Press Saya bukan fungsi yang bereaksi asli
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})
}
Breakable Bee