Add symptom view component with back button listener

This commit is contained in:
Julia Friesel
2019-05-11 17:42:57 +02:00
parent 2528c03315
commit 08fd3afc34
11 changed files with 113 additions and 72 deletions
@@ -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()
}
}