Skip to content

Commit

Permalink
fix rn 0.43 comp (#1819)
Browse files Browse the repository at this point in the history
  • Loading branch information
kesha-antonov authored and aksonov committed May 11, 2017
1 parent 6c52665 commit 2147a32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React, {
Component,
PropTypes,
} from 'react';
import { BackAndroid } from 'react-native';
import { BackHandler } from 'react-native';
import NavigationExperimental from 'react-native-experimental-navigation';

import Actions, { ActionMap } from './Actions';
Expand Down Expand Up @@ -52,7 +52,7 @@ class Router extends Component {
}

componentDidMount() {
BackAndroid.addEventListener('hardwareBackPress', this.handleBackAndroid);
BackHandler.addEventListener('hardwareBackPress', this.handleBackAndroid);
}

componentWillReceiveProps(props) {
Expand All @@ -61,7 +61,7 @@ class Router extends Component {
}

componentWillUnmount() {
BackAndroid.removeEventListener('hardwareBackPress', this.handleBackAndroid);
BackHandler.removeEventListener('hardwareBackPress', this.handleBackAndroid);
}

handleBackAndroid() {
Expand Down

0 comments on commit 2147a32

Please sign in to comment.