@@ -481,7 +481,7 @@ class BottomNavigation extends React.Component<Props, State> {
481481
482482 private animateToCurrentIndex = ( ) => {
483483 const shifting = this . isShifting ( ) ;
484- const { sceneAnimationEnabled , navigationState } = this . props ;
484+ const { navigationState } = this . props ;
485485 const { routes, index } = navigationState ;
486486
487487 // Reset the ripple to avoid glitch if it's currently animating
@@ -496,7 +496,7 @@ class BottomNavigation extends React.Component<Props, State> {
496496 ...routes . map ( ( _ , i ) =>
497497 Animated . timing ( this . state . tabs [ i ] , {
498498 toValue : i === index ? 1 : 0 ,
499- duration : shifting && sceneAnimationEnabled !== false ? 150 : 0 ,
499+ duration : shifting ? 150 : 0 ,
500500 useNativeDriver : true ,
501501 } )
502502 ) ,
@@ -585,6 +585,7 @@ class BottomNavigation extends React.Component<Props, State> {
585585 labeled,
586586 style,
587587 theme,
588+ sceneAnimationEnabled,
588589 } = this . props ;
589590
590591 const {
@@ -655,15 +656,16 @@ class BottomNavigation extends React.Component<Props, State> {
655656 // Don't render a screen if we've never navigated to it
656657 return null ;
657658 }
659+ const focused = navigationState . index === index ;
660+
661+ const opacity =
662+ sceneAnimationEnabled !== false ? tabs [ index ] : focused ? 1 : 0 ;
658663
659- const opacity = tabs [ index ] ;
660664 const top = offsets [ index ] . interpolate ( {
661665 inputRange : [ 0 , 1 ] ,
662666 outputRange : [ 0 , FAR_FAR_AWAY ] ,
663667 } ) ;
664668
665- const focused = navigationState . index === index ;
666-
667669 return (
668670 < Animated . View
669671 key = { route . key }
0 commit comments