Use arrow function instead of bind

This commit is contained in:
Brent Vatne
2018-03-14 11:16:01 -07:00
parent 0ff3347e97
commit c39ec7a10c
2 changed files with 2 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ class CardStack extends React.Component {
const screenNavigation = addNavigationHelpers({
dispatch: navigation.dispatch,
state: scene.route,
isFocused: this._isRouteFocused.bind(this, scene.route),
isFocused: () => this._isRouteFocused(scene.route),
addListener: this._childEventSubscribers[scene.route.key],
});
screenDetails = {

View File

@@ -108,7 +108,7 @@ export default class DrawerView extends React.PureComponent {
this._screenNavigationProp = addNavigationHelpers({
dispatch: navigation.dispatch,
state: navigationState,
isFocused: this._isRouteFocused.bind(this, navigationState),
isFocused: () => this._isRouteFocused(navigationState),
addListener: this._childEventSubscribers[navigationState.key],
});
};