jeudi 6 juillet 2017

How to simulate android back button in react-native

In onComponentDidMount I'm adding a listener to handle Android back navigation and would like to add tests around it's behaviour, but need a way to simulate clicking the back button.

onComponentDidMount () {
  BackHandler.addEventListener('hardwareBackPress', () => {...})
}

Aucun commentaire:

Enregistrer un commentaire