Skip to content

Commit 5411816

Browse files
committed
fix: update screens for native stack
1 parent d8bda60 commit 5411816

File tree

8 files changed

+18
-14
lines changed

8 files changed

+18
-14
lines changed

example/ios/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ PODS:
257257
- React
258258
- RNReanimated (1.4.0):
259259
- React
260-
- RNScreens (2.0.0-alpha.31):
260+
- RNScreens (2.0.0-alpha.33):
261261
- React
262262
- UMBarCodeScannerInterface (5.0.0)
263263
- UMCameraInterface (5.0.0)
@@ -519,7 +519,7 @@ SPEC CHECKSUMS:
519519
RNCMaskedView: dd13f9f7b146a9ad82f9b7eb6c9b5548fcf6e990
520520
RNGestureHandler: 02905abe54e1f6e59c081a10b4bd689721e17aa6
521521
RNReanimated: b2ab0b693dddd2339bd2f300e770f6302d2e960c
522-
RNScreens: 5fcc247984ffae92240e7e8e39e1e19c0a0f6f67
522+
RNScreens: 1c7fd499b915c77c21e8e6c327890c5af9b4cf7e
523523
UMBarCodeScannerInterface: 3802c8574ef119c150701d679ab386e2266d6a54
524524
UMCameraInterface: 985d301f688ed392f815728f0dd906ca34b7ccb1
525525
UMConstantsInterface: bda5f8bd3403ad99e663eb3c4da685d063c5653c

example/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"react-native-reanimated": "^1.4.0",
2727
"react-native-restart": "^0.0.13",
2828
"react-native-safe-area-context": "^0.6.2",
29-
"react-native-screens": "^2.0.0-alpha.31",
29+
"react-native-screens": "^2.0.0-alpha.33",
3030
"react-native-tab-view": "2.11.0",
3131
"react-native-unimodules": "^0.7.0",
3232
"react-native-web": "^0.11.7"

packages/drawer/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"react-native-gesture-handler": "^1.5.3",
4646
"react-native-reanimated": "^1.4.0",
4747
"react-native-safe-area-context": "^0.6.2",
48-
"react-native-screens": "^2.0.0-alpha.31",
48+
"react-native-screens": "^2.0.0-alpha.33",
4949
"typescript": "^3.7.4"
5050
},
5151
"peerDependencies": {
@@ -55,7 +55,7 @@
5555
"react-native-gesture-handler": "^1.0.0",
5656
"react-native-reanimated": "^1.0.0",
5757
"react-native-safe-area-context": "^0.6.0",
58-
"react-native-screens": "^1.0.0-alpha.0 || ^2.0.0-alpha.31"
58+
"react-native-screens": "^2.0.0-alpha.33"
5959
},
6060
"@react-native-community/bob": {
6161
"source": "src",

packages/native-stack/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
"devDependencies": {
3232
"@react-native-community/bob": "^0.8.0",
3333
"del-cli": "^3.0.0",
34-
"react-native-screens": "^2.0.0-alpha.31",
34+
"react-native-screens": "^2.0.0-alpha.33",
3535
"typescript": "^3.7.4"
3636
},
3737
"peerDependencies": {
3838
"@react-navigation/native": "^5.0.0-alpha.0",
3939
"react": "*",
4040
"react-native": "*",
41-
"react-native-screens": "^2.0.0-alpha.31"
41+
"react-native-screens": "^2.0.0-alpha.33"
4242
},
4343
"@react-native-community/bob": {
4444
"source": "src",

packages/native-stack/src/views/HeaderConfig.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export default function HeaderConfig(props: Props) {
5959
backTitleFontFamily={headerBackTitleStyle.fontFamily}
6060
backTitleFontSize={headerBackTitleStyle.fontSize}
6161
color={headerTintColor !== undefined ? headerTintColor : colors.primary}
62-
gestureEnabled={gestureEnabled === undefined ? true : gestureEnabled}
62+
// Keep this temporarily for compatibility with old versions of screens
63+
// @ts-ignore
64+
gestureEnabled={gestureEnabled}
6365
largeTitle={headerLargeTitle}
6466
largeTitleFontFamily={headerLargeTitleStyle.fontFamily}
6567
largeTitleFontSize={headerLargeTitleStyle.fontSize}

packages/native-stack/src/views/NativeStackView.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default function NativeStackView({
3535
{state.routes.map(route => {
3636
const { options, render: renderScene } = descriptors[route.key];
3737
const {
38+
gestureEnabled,
3839
stackPresentation = 'push',
3940
stackAnimation,
4041
contentStyle,
@@ -44,6 +45,7 @@ export default function NativeStackView({
4445
<Screen
4546
key={route.key}
4647
style={StyleSheet.absoluteFill}
48+
gestureEnabled={gestureEnabled}
4749
stackPresentation={stackPresentation}
4850
stackAnimation={stackAnimation}
4951
onAppear={() => {

packages/stack/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"react-native": "~0.61.5",
4646
"react-native-gesture-handler": "^1.5.3",
4747
"react-native-safe-area-context": "^0.6.2",
48-
"react-native-screens": "^2.0.0-alpha.31",
48+
"react-native-screens": "^2.0.0-alpha.33",
4949
"typescript": "^3.7.4"
5050
},
5151
"peerDependencies": {
@@ -55,7 +55,7 @@
5555
"react-native": "*",
5656
"react-native-gesture-handler": "^1.0.0",
5757
"react-native-safe-area-context": "^0.6.0",
58-
"react-native-screens": "^1.0.0-alpha.0 || ^2.0.0-alpha.31"
58+
"react-native-screens": "^2.0.0-alpha.33"
5959
},
6060
"@react-native-community/bob": {
6161
"source": "src",

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -13598,10 +13598,10 @@ react-native-safe-area-view@^0.14.6:
1359813598
dependencies:
1359913599
hoist-non-react-statics "^2.3.1"
1360013600

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

0 commit comments

Comments
 (0)