@react-navigation/stack 7.0.0-rc.27 → 7.0.0-rc.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-navigation/stack",
3
3
  "description": "Stack navigator component for iOS and Android with animated transitions and gestures",
4
- "version": "7.0.0-rc.27",
4
+ "version": "7.0.0-rc.29",
5
5
  "keywords": [
6
6
  "react-native-component",
7
7
  "react-component",
@@ -51,31 +51,31 @@
51
51
  "clean": "del lib"
52
52
  },
53
53
  "dependencies": {
54
- "@react-navigation/elements": "^2.0.0-rc.25",
54
+ "@react-navigation/elements": "^2.0.0-rc.26",
55
55
  "color": "^4.2.3"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@jest/globals": "^29.7.0",
59
- "@react-navigation/native": "^7.0.0-rc.20",
59
+ "@react-navigation/native": "^7.0.0-rc.21",
60
60
  "@testing-library/react-native": "^12.4.3",
61
61
  "@types/color": "^3.0.6",
62
62
  "@types/react": "~18.2.79",
63
63
  "del-cli": "^5.1.0",
64
64
  "react": "18.2.0",
65
- "react-native": "0.74.2",
65
+ "react-native": "0.74.5",
66
66
  "react-native-builder-bob": "^0.29.0",
67
67
  "react-native-gesture-handler": "~2.16.1",
68
68
  "react-native-safe-area-context": "4.10.1",
69
- "react-native-screens": "4.0.0-beta.9",
69
+ "react-native-screens": "4.0.0-beta.16",
70
70
  "typescript": "^5.5.2"
71
71
  },
72
72
  "peerDependencies": {
73
- "@react-navigation/native": "^7.0.0-rc.20",
73
+ "@react-navigation/native": "^7.0.0-rc.21",
74
74
  "react": ">= 18.2.0",
75
- "react-native": ">= 0.72.0",
75
+ "react-native": "*",
76
76
  "react-native-gesture-handler": ">= 2.0.0",
77
77
  "react-native-safe-area-context": ">= 4.0.0",
78
- "react-native-screens": ">= 4.0.0"
78
+ "react-native-screens": ">= 4.0.0 || >= 4.0.0-beta.16"
79
79
  },
80
80
  "react-native-builder-bob": {
81
81
  "source": "src",
@@ -102,5 +102,5 @@
102
102
  ]
103
103
  ]
104
104
  },
105
- "gitHead": "1ad42666923bd76dd9e7dd731ba39cc31dd27317"
105
+ "gitHead": "dfb56c62f21728a7e130945fd4e7b74e9c130fff"
106
106
  }
@@ -218,10 +218,17 @@ function CardContainerInner({
218
218
  href = buildHref(route.name, route.params);
219
219
  }
220
220
 
221
- const headerBack = React.useMemo(
222
- () => ({ title: backTitle, href }),
223
- [backTitle, href]
224
- );
221
+ const canGoBack = previousScene != null;
222
+ const headerBack = React.useMemo(() => {
223
+ if (canGoBack) {
224
+ return {
225
+ href,
226
+ title: backTitle,
227
+ };
228
+ }
229
+
230
+ return undefined;
231
+ }, [canGoBack, backTitle, href]);
225
232
 
226
233
  return (
227
234
  <Card