diff --git a/lib/NavigationComponent.js b/lib/NavigationComponent.js index f096203..0379510 100644 --- a/lib/NavigationComponent.js +++ b/lib/NavigationComponent.js @@ -58,6 +58,7 @@ class NavigationComponent extends PureComponent { backgroundColor: bnOptions.backgroundColor, shifting: bnOptions.shifting } + const previousScene = navigationState.routes[navigationState.index] return ( { focused, tintColor: focused ? activeTintColor : inactiveTintColor } - const onPress = navigationGetOnPress(scene) + const onPress = navigationGetOnPress(previousScene, scene) const label = getLabel(scene) const icon = renderIcon(scene)