Skip to content

Commit 8daede9

Browse files
committed
chore: upgrade react navigation in example
1 parent 80730d9 commit 8daede9

File tree

4 files changed

+40
-91
lines changed

4 files changed

+40
-91
lines changed

example/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"dependencies": {
1515
"@callstack/react-theme-provider": "^3.0.2",
1616
"@react-native-community/masked-view": "0.1.6",
17-
"@react-navigation/drawer": "^5.0.0-alpha.27",
18-
"@react-navigation/native": "^5.0.0-alpha.18",
19-
"@react-navigation/stack": "^5.0.0-alpha.43",
17+
"@react-navigation/drawer": "^5.0.0-alpha.39",
18+
"@react-navigation/native": "^5.0.0-alpha.27",
19+
"@react-navigation/stack": "^5.0.0-alpha.61",
2020
"expo": "^36.0.0",
2121
"expo-font": "~8.0.0",
2222
"expo-keep-awake": "~8.0.0",

example/src/RootNavigator.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import * as React from 'react';
2-
import { Platform } from 'react-native';
32
import { Appbar } from 'react-native-paper';
43
import { DrawerNavigationProp } from '@react-navigation/drawer';
54
import { createStackNavigator } from '@react-navigation/stack';
6-
import { createSimpleNavigator } from './SimpleNavigator';
75
import ExampleList, { examples } from './ExampleList';
86

9-
const Stack: ReturnType<typeof createStackNavigator> =
10-
Platform.OS === 'web'
11-
? (createSimpleNavigator() as any)
12-
: createStackNavigator();
7+
const Stack = createStackNavigator();
138

149
export default function Root() {
1510
return (
@@ -20,14 +15,14 @@ export default function Root() {
2015
<Appbar.Header>
2116
{previous ? (
2217
<Appbar.BackAction onPress={() => navigation.goBack()} />
23-
) : (
18+
) : (navigation as any).openDrawer ? (
2419
<Appbar.Action
2520
icon="menu"
2621
onPress={() =>
2722
((navigation as any) as DrawerNavigationProp<{}>).openDrawer()
2823
}
2924
/>
30-
)}
25+
) : null}
3126
<Appbar.Content title={scene.descriptor.options.title} />
3227
</Appbar.Header>
3328
),

example/src/SimpleNavigator.tsx

Lines changed: 0 additions & 55 deletions
This file was deleted.

example/yarn.lock

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,44 +2027,48 @@
20272027
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.6.tgz#c7f2ac187c1f25aa8c30d11baa8f4398eca3bb84"
20282028
integrity sha512-PpMoeXwPUoldCRKDuSi+zK5rT+sJTW6ri6RdGPkSKRzU77Q1d9IaR0O5IKvBj0XSdL3p+dcOa05gk35aGDffBQ==
20292029

2030-
"@react-navigation/core@^5.0.0-alpha.27":
2031-
version "5.0.0-alpha.27"
2032-
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.0.0-alpha.27.tgz#40a209910e284635570d539eeb0bd6cecb9f8124"
2033-
integrity sha512-R/pIxAyJaORLlUFZlwenN92Llo4pyWNRZJ190JTHDqL5T17yD0jokXoketl3+CO+jUgwesZqy7M4pSiMdSiDqA==
2030+
"@react-navigation/core@^5.0.0-alpha.35":
2031+
version "5.0.0-alpha.35"
2032+
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.0.0-alpha.35.tgz#169d96443e72c08a1f9d5c30cfd911910306d560"
2033+
integrity sha512-i7Hti3gk8dDa/QSWg12lxo4B5Q5pY5/16qq4C1ISxU10iYaQUR/P4DrPg5mGB45Fl5u3UZ6mafwpPwsdlAOl1g==
20342034
dependencies:
20352035
escape-string-regexp "^2.0.0"
20362036
query-string "^6.9.0"
20372037
shortid "^2.2.15"
20382038
use-subscription "^1.3.0"
20392039

2040-
"@react-navigation/drawer@^5.0.0-alpha.27":
2041-
version "5.0.0-alpha.27"
2042-
resolved "https://registry.yarnpkg.com/@react-navigation/drawer/-/drawer-5.0.0-alpha.27.tgz#c7ab6feb7b7b27a427e00118bc39d1bc5041a1e6"
2043-
integrity sha512-5EHwkShkxr53BuGxc/8++E1gNFPKBCd/yycQJG5gbTKcRjWLTLe1qe3qd2Y6GMgFUdItnJQMNmKJLbRGMPeD1A==
2040+
"@react-navigation/drawer@^5.0.0-alpha.39":
2041+
version "5.0.0-alpha.39"
2042+
resolved "https://registry.yarnpkg.com/@react-navigation/drawer/-/drawer-5.0.0-alpha.39.tgz#57ef63607e32a6ab601acbcddf2a35ca0c0d52cc"
2043+
integrity sha512-JuSpAnf7JlvpNMqsM3QjB2Giks5hRq03Ivucov9Cp843UYyMY+KsD7dxb743Q4ulvLvXf2Oh08uLy+figrasBQ==
20442044
dependencies:
2045-
"@react-navigation/routers" "^5.0.0-alpha.16"
2045+
"@react-navigation/routers" "^5.0.0-alpha.25"
2046+
color "^3.1.2"
2047+
react-native-iphone-x-helper "^1.2.1"
20462048

2047-
"@react-navigation/native@^5.0.0-alpha.18":
2048-
version "5.0.0-alpha.18"
2049-
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-5.0.0-alpha.18.tgz#d09212d16b813258ae438eb123b55e223e1cdaea"
2050-
integrity sha512-VqHts/HX7Nzw6pIEjUeDucCT2T98dgM3gqaZCIjkna4IPHfBH0RuT9hJYQuUGYuTBVdoMTSDfMJ3GvIU+7nIDQ==
2049+
"@react-navigation/native@^5.0.0-alpha.27":
2050+
version "5.0.0-alpha.27"
2051+
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-5.0.0-alpha.27.tgz#d66a69aa9e041353e5dcf1c042da0f4a6eebecc1"
2052+
integrity sha512-vZe7FfBamnH1kwq6Uwv23E+KSfBg4+AO1/AcptJLY5CKdYCXF1svuB5NBVAvwXrr4jrnvhjVDceUmeQXHPGfOw==
20512053
dependencies:
2052-
"@react-navigation/core" "^5.0.0-alpha.27"
2054+
"@react-navigation/core" "^5.0.0-alpha.35"
20532055

2054-
"@react-navigation/routers@^5.0.0-alpha.16":
2055-
version "5.0.0-alpha.16"
2056-
resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.0.0-alpha.16.tgz#58feae35ada96202126897d716c6942b25e29f5e"
2057-
integrity sha512-19riekFcniNqxk9bvflwLjjd6Tm01UEa1eJuQBisnIdiCbzLCZ77rltCoVh8BvgPU6TldZ/oKCRcq5z+KZcW6A==
2056+
"@react-navigation/routers@^5.0.0-alpha.25":
2057+
version "5.0.0-alpha.25"
2058+
resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.0.0-alpha.25.tgz#752fa6d36fdb00a151599d32adb0f6cf799a8ab8"
2059+
integrity sha512-xZDUa8AL/fE3pItBI2QCv0yGqVBlxdOanfpvGng/m8OoLF2aqj9s6hxjBkVjyjdOg6RoT9bz0GlJIjAXcM9ReA==
20582060
dependencies:
2059-
"@react-navigation/core" "^5.0.0-alpha.27"
2061+
"@react-navigation/core" "^5.0.0-alpha.35"
20602062
shortid "^2.2.15"
20612063

2062-
"@react-navigation/stack@^5.0.0-alpha.43":
2063-
version "5.0.0-alpha.43"
2064-
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.0.0-alpha.43.tgz#2081d4520125b1c72a6f33f708a4ff78a0f33957"
2065-
integrity sha512-oi+KfYoTd0xUkTNJ6ic/8NdEbzUtyD+hqiTGd67UGL8OsLLaRmDhXe+8mmaWvb6uVg/m09y32Rh9QHktu3TX9A==
2064+
"@react-navigation/stack@^5.0.0-alpha.61":
2065+
version "5.0.0-alpha.61"
2066+
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.0.0-alpha.61.tgz#cb9e4bf4c04e2b5bb4e6d1f4495dbaba143a30e9"
2067+
integrity sha512-o/l4RJJtXuDbXOwkgupZApddLBCdh/2H9tGCA1/RaVnG3Wz3F2R4+rTU4ABIsU4wAg008iyrVda/MfGWj0CcQA==
20662068
dependencies:
2067-
"@react-navigation/routers" "^5.0.0-alpha.16"
2069+
"@react-navigation/routers" "^5.0.0-alpha.25"
2070+
color "^3.1.2"
2071+
react-native-iphone-x-helper "^1.2.1"
20682072

20692073
"@segment/loosely-validate-event@^2.0.0":
20702074
version "2.0.0"
@@ -3920,7 +3924,7 @@ color-support@^1.1.3:
39203924
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
39213925
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
39223926

3923-
color@3.1.2, color@^3.0.0, color@^3.1.1:
3927+
color@3.1.2, color@^3.0.0, color@^3.1.1, color@^3.1.2:
39243928
version "3.1.2"
39253929
resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10"
39263930
integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==
@@ -10127,6 +10131,11 @@ react-native-gesture-handler@~1.5.0:
1012710131
invariant "^2.2.4"
1012810132
prop-types "^15.7.2"
1012910133

10134+
react-native-iphone-x-helper@^1.2.1:
10135+
version "1.2.1"
10136+
resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz#645e2ffbbb49e80844bb4cbbe34a126fda1e6772"
10137+
integrity sha512-/VbpIEp8tSNNHIvstuA3Swx610whci1Zpc9mqNkqn14DkMbw+ORviln2u0XyHG1kPvvwTNGZY6QpeFwxYaSdbQ==
10138+
1013010139
react-native-reanimated@~1.4.0:
1013110140
version "1.4.0"
1013210141
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-1.4.0.tgz#7f1acbf9be08492d834f512700570978052be2f9"

0 commit comments

Comments
 (0)