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

This commit is contained in:
Satyajit Sahoo
2020-10-30 01:59:25 +01:00
parent dff6c3ee7c
commit 8411e6f764
3 changed files with 7 additions and 9 deletions

View File

@@ -45,7 +45,7 @@
"devDependencies": {
"@react-native-community/bob": "^0.16.2",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/stack": "^5.10.0",
"@react-navigation/stack": "^5.11.0",
"@types/color": "^3.0.1",
"@types/react": "^16.9.53",
"@types/react-native": "^0.63.30",

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 { NavigationState as StackNavigationState } from 'react-navigation';
@@ -394,9 +393,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;

View File

@@ -4179,10 +4179,10 @@
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz#5dda643e19e587793bc2034dd9bf7398ad43d401"
integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ==
"@react-navigation/stack@^5.10.0":
version "5.10.0"
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.10.0.tgz#2d4b644067165e304de67cab79cab3a4c486272c"
integrity sha512-1+OVWPHTXc0HT4iMedVHWmIi4RnDOCfxmEjmEZfPCV+7BuzAJKAMW0KxJBFj3uAJscS/FxlZ3Qnjo5Z4aSNXqA==
"@react-navigation/stack@^5.11.0":
version "5.11.0"
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.11.0.tgz#1fcb014e3606c7c48315934194cbd0691e115e99"
integrity sha512-+YsiC7X21PaSclxl2fo7dCrOwbSSmuedZtRXQWwdAgcSqCKZUXi+k8CFoEebwvQA3DghhseYNCvQwLi9rphU5w==
dependencies:
color "^3.1.3"
react-native-iphone-x-helper "^1.3.0"