mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-12 22:51:18 +08:00
Use arrow function instead of bind
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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],
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user