fix: enable screens only on supported platforms (#9494)

This commit is contained in:
Wojciech Lewicki
2021-05-09 06:42:56 +02:00
committed by GitHub
parent 7809bc0650
commit 8da4c58065
3 changed files with 10 additions and 6 deletions

View File

@@ -461,9 +461,9 @@ export default class CardStack extends React.Component<Props, State> {
onGestureStart,
onGestureEnd,
onGestureCancel,
// Enable on new versions of `react-native-screens`
// On older versions of `react-native-screens`, there's an issue with screens not being responsive to user interaction.
detachInactiveScreens = true,
detachInactiveScreens = Platform.OS === 'web' ||
Platform.OS === 'android' ||
Platform.OS === 'ios',
} = this.props;
const { scenes, layout, gestures, headerHeights } = this.state;