@@ -135,18 +135,18 @@ const MaybeScreen = ({
135
135
// https://facebook.github.io/react-native/docs/view#removeclippedsubviews
136
136
// This can be useful if screens is not enabled
137
137
// It's buggy on iOS, so we don't enable it there
138
+ top :
139
+ enabled && typeof active === 'number' && ! active ? FAR_FAR_AWAY : 0 ,
138
140
transform : [
139
141
{
142
+ // If the `active` prop is animated node, we can't use the `left` property due to native driver
143
+ // So we use `translateY` instead
140
144
translateY :
141
- Platform . OS !== 'ios' && enabled
142
- ? typeof active === 'number'
143
- ? active
144
- ? 0
145
- : FAR_FAR_AWAY
146
- : active . interpolate ( {
147
- inputRange : [ 0 , 1 ] ,
148
- outputRange : [ FAR_FAR_AWAY , 0 ] ,
149
- } )
145
+ enabled && typeof active !== 'number'
146
+ ? active . interpolate ( {
147
+ inputRange : [ 0 , 1 ] ,
148
+ outputRange : [ FAR_FAR_AWAY , 0 ] ,
149
+ } )
150
150
: 0 ,
151
151
} ,
152
152
] ,
@@ -445,7 +445,9 @@ export default class CardStack extends React.Component<Props, State> {
445
445
446
446
// Screens is buggy on iOS, so we don't enable it there
447
447
// For modals, usually we want the screen underneath to be visible, so also disable it there
448
- const isScreensEnabled = Platform . OS !== 'ios' ;
448
+ const isScreensEnabled =
449
+ Platform . OS !== 'ios' &&
450
+ ( isInsufficientExpoVersion ? mode !== 'modal' : true ) ;
449
451
450
452
return (
451
453
< React . Fragment >
@@ -460,9 +462,9 @@ export default class CardStack extends React.Component<Props, State> {
460
462
const scene = scenes [ index ] ;
461
463
462
464
// Display current screen and a screen beneath.
463
-
464
465
let isScreenActive : Animated . AnimatedInterpolation | 0 | 1 =
465
466
index >= self . length - 2 ? 1 : 0 ;
467
+
466
468
if ( isInsufficientExpoVersion ) {
467
469
isScreenActive =
468
470
index === self . length - 1
0 commit comments