Add symptom view component with back button listener
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Component } from 'react'
|
||||
import { BackHandler } from 'react-native'
|
||||
|
||||
export default class SymptomView extends Component {
|
||||
constructor() {
|
||||
super()
|
||||
this.backHandler = BackHandler.addEventListener('hardwareBackPress', this.save.bind(this))
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.backHandler.remove()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user