feat: enable react-native-screens in Stack by default on iOS

This commit is contained in:
Satyajit Sahoo
2020-10-28 22:15:37 +01:00
parent d26bcc057e
commit 45dbe5c40e

View File

@@ -4,7 +4,6 @@ import {
StyleSheet,
LayoutChangeEvent,
Dimensions,
Platform,
} from 'react-native';
import type { EdgeInsets } from 'react-native-safe-area-context';
import type {
@@ -397,9 +396,8 @@ export default class CardStack extends React.Component<Props, State> {
onGestureStart,
onGestureEnd,
onGestureCancel,
detachInactiveScreens = Platform.OS === 'ios'
? false // Disable `react-native-screens` on iOS by default since it's buggy
: shouldUseActivityState || mode !== 'modal', // Enable on new versions of screens or for non modals on older versions
// Enable on new versions of screens or for non modals on older versions
detachInactiveScreens = shouldUseActivityState || mode !== 'modal',
} = this.props;
const { scenes, layout, gestures, headerHeights } = this.state;