Skip to content

Commit

Permalink
Fix For React Navigation Beta 20+ (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
keeleycarrigan authored and timomeh committed Dec 15, 2017
1 parent f208bef commit 40bcae5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/NavigationComponent.js
Expand Up @@ -58,6 +58,7 @@ class NavigationComponent extends PureComponent<void, NCProps, void> {
backgroundColor: bnOptions.backgroundColor,
shifting: bnOptions.shifting
}
const previousScene = navigationState.routes[navigationState.index]

return (
<BottomNavigation
Expand All @@ -80,7 +81,7 @@ class NavigationComponent extends PureComponent<void, NCProps, void> {
focused,
tintColor: focused ? activeTintColor : inactiveTintColor
}
const onPress = navigationGetOnPress(scene)
const onPress = navigationGetOnPress(previousScene, scene)
const label = getLabel(scene)
const icon = renderIcon(scene)

Expand Down

0 comments on commit 40bcae5

Please sign in to comment.