Skip to content

Commit

Permalink
fix: update screens for native stack
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Feb 2, 2020
1 parent d8bda60 commit 5411816
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ PODS:
- React
- RNReanimated (1.4.0):
- React
- RNScreens (2.0.0-alpha.31):
- RNScreens (2.0.0-alpha.33):
- React
- UMBarCodeScannerInterface (5.0.0)
- UMCameraInterface (5.0.0)
Expand Down Expand Up @@ -519,7 +519,7 @@ SPEC CHECKSUMS:
RNCMaskedView: dd13f9f7b146a9ad82f9b7eb6c9b5548fcf6e990
RNGestureHandler: 02905abe54e1f6e59c081a10b4bd689721e17aa6
RNReanimated: b2ab0b693dddd2339bd2f300e770f6302d2e960c
RNScreens: 5fcc247984ffae92240e7e8e39e1e19c0a0f6f67
RNScreens: 1c7fd499b915c77c21e8e6c327890c5af9b4cf7e
UMBarCodeScannerInterface: 3802c8574ef119c150701d679ab386e2266d6a54
UMCameraInterface: 985d301f688ed392f815728f0dd906ca34b7ccb1
UMConstantsInterface: bda5f8bd3403ad99e663eb3c4da685d063c5653c
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"react-native-reanimated": "^1.4.0",
"react-native-restart": "^0.0.13",
"react-native-safe-area-context": "^0.6.2",
"react-native-screens": "^2.0.0-alpha.31",
"react-native-screens": "^2.0.0-alpha.33",
"react-native-tab-view": "2.11.0",
"react-native-unimodules": "^0.7.0",
"react-native-web": "^0.11.7"
Expand Down
4 changes: 2 additions & 2 deletions packages/drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"react-native-gesture-handler": "^1.5.3",
"react-native-reanimated": "^1.4.0",
"react-native-safe-area-context": "^0.6.2",
"react-native-screens": "^2.0.0-alpha.31",
"react-native-screens": "^2.0.0-alpha.33",
"typescript": "^3.7.4"
},
"peerDependencies": {
Expand All @@ -55,7 +55,7 @@
"react-native-gesture-handler": "^1.0.0",
"react-native-reanimated": "^1.0.0",
"react-native-safe-area-context": "^0.6.0",
"react-native-screens": "^1.0.0-alpha.0 || ^2.0.0-alpha.31"
"react-native-screens": "^2.0.0-alpha.33"
},
"@react-native-community/bob": {
"source": "src",
Expand Down
4 changes: 2 additions & 2 deletions packages/native-stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
"devDependencies": {
"@react-native-community/bob": "^0.8.0",
"del-cli": "^3.0.0",
"react-native-screens": "^2.0.0-alpha.31",
"react-native-screens": "^2.0.0-alpha.33",
"typescript": "^3.7.4"
},
"peerDependencies": {
"@react-navigation/native": "^5.0.0-alpha.0",
"react": "*",
"react-native": "*",
"react-native-screens": "^2.0.0-alpha.31"
"react-native-screens": "^2.0.0-alpha.33"
},
"@react-native-community/bob": {
"source": "src",
Expand Down
4 changes: 3 additions & 1 deletion packages/native-stack/src/views/HeaderConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export default function HeaderConfig(props: Props) {
backTitleFontFamily={headerBackTitleStyle.fontFamily}
backTitleFontSize={headerBackTitleStyle.fontSize}
color={headerTintColor !== undefined ? headerTintColor : colors.primary}
gestureEnabled={gestureEnabled === undefined ? true : gestureEnabled}
// Keep this temporarily for compatibility with old versions of screens
// @ts-ignore
gestureEnabled={gestureEnabled}
largeTitle={headerLargeTitle}
largeTitleFontFamily={headerLargeTitleStyle.fontFamily}
largeTitleFontSize={headerLargeTitleStyle.fontSize}
Expand Down
2 changes: 2 additions & 0 deletions packages/native-stack/src/views/NativeStackView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default function NativeStackView({
{state.routes.map(route => {
const { options, render: renderScene } = descriptors[route.key];
const {
gestureEnabled,
stackPresentation = 'push',
stackAnimation,
contentStyle,
Expand All @@ -44,6 +45,7 @@ export default function NativeStackView({
<Screen
key={route.key}
style={StyleSheet.absoluteFill}
gestureEnabled={gestureEnabled}
stackPresentation={stackPresentation}
stackAnimation={stackAnimation}
onAppear={() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"react-native": "~0.61.5",
"react-native-gesture-handler": "^1.5.3",
"react-native-safe-area-context": "^0.6.2",
"react-native-screens": "^2.0.0-alpha.31",
"react-native-screens": "^2.0.0-alpha.33",
"typescript": "^3.7.4"
},
"peerDependencies": {
Expand All @@ -55,7 +55,7 @@
"react-native": "*",
"react-native-gesture-handler": "^1.0.0",
"react-native-safe-area-context": "^0.6.0",
"react-native-screens": "^1.0.0-alpha.0 || ^2.0.0-alpha.31"
"react-native-screens": "^2.0.0-alpha.33"
},
"@react-native-community/bob": {
"source": "src",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13598,10 +13598,10 @@ react-native-safe-area-view@^0.14.6:
dependencies:
hoist-non-react-statics "^2.3.1"

react-native-screens@^2.0.0-alpha.31:
version "2.0.0-alpha.31"
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.0.0-alpha.31.tgz#399f9fbd882730b4df72e102ce5563109009eb3f"
integrity sha512-eHYjWBnKSSMtxxzT9o/RYxNL80wWIuXWSGbbb2uxjvpbZdQByq2tl84m+wXFyTz1rbJqqIHrcqWD/hEW58CQsg==
react-native-screens@^2.0.0-alpha.33:
version "2.0.0-alpha.33"
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.0.0-alpha.33.tgz#66ecda655958f4939ddf31eb84c4cf0af0ae8e3e"
integrity sha512-JVnrAnhWDm7+CviqOeFUtRt8eExYdvoX/y4NEhn/yLhwlSQuJiNStgg8R0j4t2XKifJ5CBNxEGpkEw12fIYYxg==
dependencies:
debounce "^1.2.0"

Expand Down

0 comments on commit 5411816

Please sign in to comment.