Skip to content

Commit f5108b7

Browse files
committed
feat: add @react-navigation/native react-native-safe-area-context
1 parent 3cbc157 commit f5108b7

File tree

4 files changed

+94
-4
lines changed

4 files changed

+94
-4
lines changed

App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ const App = () => {
7777
}}
7878
>
7979
<Section title="Step One">
80-
Edit <Text style={styles.highlight}>App.tsx</Text> to change this screen and then come
81-
back to see your edits.
80+
应用程序 Edit <Text style={styles.highlight}>App.tsx</Text> to change this screen and
81+
then come back to see your edits.
8282
</Section>
8383
<Section title="See Your Changes">
8484
<ReloadInstructions />

android/app/src/main/java/com/sunofbeachern/MainActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.sunofbeachern;
2+
import android.os.Bundle;
23

34
import com.facebook.react.ReactActivity;
45
import com.facebook.react.ReactActivityDelegate;
@@ -25,6 +26,11 @@ protected ReactActivityDelegate createReactActivityDelegate() {
2526
return new MainActivityDelegate(this, getMainComponentName());
2627
}
2728

29+
@Override
30+
protected void onCreate(Bundle savedInstanceState) {
31+
super.onCreate(null);
32+
}
33+
2834
public static class MainActivityDelegate extends ReactActivityDelegate {
2935
public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
3036
super(activity, mainComponentName);

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
1111
},
1212
"dependencies": {
13+
"@react-navigation/native": "^6.0.11",
1314
"react": "18.0.0",
14-
"react-native": "0.69.1"
15+
"react-native": "0.69.1",
16+
"react-native-safe-area-context": "^4.3.1",
17+
"react-native-screens": "^3.15.0"
1518
},
1619
"devDependencies": {
1720
"@babel/core": "^7.12.9",

yarn.lock

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,34 @@
12831283
resolved "https://registry.npmmirror.com/@react-native/polyfills/-/polyfills-2.0.0.tgz#4c40b74655c83982c8cf47530ee7dc13d957b6aa"
12841284
integrity sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ==
12851285

1286+
"@react-navigation/core@^6.2.2":
1287+
version "6.2.2"
1288+
resolved "https://registry.npmmirror.com/@react-navigation/core/-/core-6.2.2.tgz#29ca539e22581616aad82b7451d47c5efe936f31"
1289+
integrity sha512-gEJ1gRqt1EIqRrnJIpSQ0wWJRue9maAQNKYrlQ0a/LSKErF3g6w+sD2wW4Bbb1yj88pGhKeuI4wdB9MVK766Pg==
1290+
dependencies:
1291+
"@react-navigation/routers" "^6.1.1"
1292+
escape-string-regexp "^4.0.0"
1293+
nanoid "^3.1.23"
1294+
query-string "^7.0.0"
1295+
react-is "^16.13.0"
1296+
1297+
"@react-navigation/native@^6.0.11":
1298+
version "6.0.11"
1299+
resolved "https://registry.npmmirror.com/@react-navigation/native/-/native-6.0.11.tgz#d221a5f6a5222187a09fc968d07d67d83ce70708"
1300+
integrity sha512-z0YTB7Czdb9SNjxfzcFNB3Vym0qmUcxpiYGOOXX8PH0s+xlIs/w+2RVp6YAvAC48A30o7MMCYqy5OeR6lrtWHg==
1301+
dependencies:
1302+
"@react-navigation/core" "^6.2.2"
1303+
escape-string-regexp "^4.0.0"
1304+
fast-deep-equal "^3.1.3"
1305+
nanoid "^3.1.23"
1306+
1307+
"@react-navigation/routers@^6.1.1":
1308+
version "6.1.1"
1309+
resolved "https://registry.npmmirror.com/@react-navigation/routers/-/routers-6.1.1.tgz#902ec3fedcf540af36cd9f013779c5134af58e73"
1310+
integrity sha512-mWWj2yh4na/OBaE7bWrft4kdAtxnG8MlV6ph3Bi6tHqgcnxENX+dnQY6y0qg/6E7cmMlaJg5nAC5y4Enr5ir8A==
1311+
dependencies:
1312+
nanoid "^3.1.23"
1313+
12861314
"@sideway/address@^4.1.3":
12871315
version "4.1.4"
12881316
resolved "https://registry.npmmirror.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0"
@@ -3126,6 +3154,11 @@ fill-range@^7.0.1:
31263154
dependencies:
31273155
to-regex-range "^5.0.1"
31283156

3157+
filter-obj@^1.1.0:
3158+
version "1.1.0"
3159+
resolved "https://registry.npmmirror.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b"
3160+
integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==
3161+
31293162
finalhandler@1.1.2:
31303163
version "1.1.2"
31313164
resolved "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
@@ -5053,6 +5086,11 @@ ms@2.1.3:
50535086
resolved "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
50545087
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
50555088

5089+
nanoid@^3.1.23:
5090+
version "3.3.4"
5091+
resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
5092+
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
5093+
50565094
nanomatch@^1.2.9:
50575095
version "1.2.13"
50585096
resolved "https://registry.npmmirror.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
@@ -5596,6 +5634,16 @@ punycode@^2.1.0, punycode@^2.1.1:
55965634
resolved "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
55975635
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
55985636

5637+
query-string@^7.0.0:
5638+
version "7.1.1"
5639+
resolved "https://registry.npmmirror.com/query-string/-/query-string-7.1.1.tgz#754620669db978625a90f635f12617c271a088e1"
5640+
integrity sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==
5641+
dependencies:
5642+
decode-uri-component "^0.2.0"
5643+
filter-obj "^1.1.0"
5644+
split-on-first "^1.0.0"
5645+
strict-uri-encode "^2.0.0"
5646+
55995647
queue-microtask@^1.2.2:
56005648
version "1.2.3"
56015649
resolved "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
@@ -5614,6 +5662,11 @@ react-devtools-core@4.24.0:
56145662
shell-quote "^1.6.1"
56155663
ws "^7"
56165664

5665+
react-freeze@^1.0.0:
5666+
version "1.0.0"
5667+
resolved "https://registry.npmmirror.com/react-freeze/-/react-freeze-1.0.0.tgz#b21c65fe1783743007c8c9a2952b1c8879a77354"
5668+
integrity sha512-yQaiOqDmoKqks56LN9MTgY06O0qQHgV4FUrikH357DydArSZHQhl0BJFqGKIZoTqi8JizF9Dxhuk1FIZD6qCaw==
5669+
56175670
"react-is@^16.12.0 || ^17.0.0", react-is@^17.0.1:
56185671
version "17.0.2"
56195672
resolved "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
@@ -5624,7 +5677,7 @@ react-devtools-core@4.24.0:
56245677
resolved "https://registry.npmmirror.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b"
56255678
integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==
56265679

5627-
react-is@^16.13.1:
5680+
react-is@^16.13.0, react-is@^16.13.1:
56285681
version "16.13.1"
56295682
resolved "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
56305683
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
@@ -5644,6 +5697,19 @@ react-native-gradle-plugin@^0.0.7:
56445697
resolved "https://registry.npmmirror.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.7.tgz#96602f909745239deab7b589443f14fce5da2056"
56455698
integrity sha512-+4JpbIx42zGTONhBTIXSyfyHICHC29VTvhkkoUOJAh/XHPEixpuBduYgf6Y4y9wsN1ARlQhBBoptTvXvAFQf5g==
56465699

5700+
react-native-safe-area-context@^4.3.1:
5701+
version "4.3.1"
5702+
resolved "https://registry.npmmirror.com/react-native-safe-area-context/-/react-native-safe-area-context-4.3.1.tgz#5cf97b25b395e0d09bc1f828920cd7da0d792ade"
5703+
integrity sha512-cEr7fknJCToTrSyDCVNg0GRdRMhyLeQa2NZwVCuzEQcWedOw/59ExomjmzCE4rxrKXs6OJbyfNtFRNyewDaHuA==
5704+
5705+
react-native-screens@^3.15.0:
5706+
version "3.15.0"
5707+
resolved "https://registry.npmmirror.com/react-native-screens/-/react-native-screens-3.15.0.tgz#78e42c8df72851b1ff235ddf5434b961ae123ca5"
5708+
integrity sha512-ezC5TibsUYyqPuuHpZoM3iEl6bRzCVBMJeGaFkn7xznuOt1VwkZVub0BvafIEYR/+AQC/RjxzMSQPs1qal0+wA==
5709+
dependencies:
5710+
react-freeze "^1.0.0"
5711+
warn-once "^0.1.0"
5712+
56475713
react-native@0.69.1:
56485714
version "0.69.1"
56495715
resolved "https://registry.npmmirror.com/react-native/-/react-native-0.69.1.tgz#093363ea697185b5d8f0e523fce3654b833ad0be"
@@ -6275,6 +6341,11 @@ spdx-license-ids@^3.0.0:
62756341
resolved "https://registry.npmmirror.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95"
62766342
integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==
62776343

6344+
split-on-first@^1.0.0:
6345+
version "1.1.0"
6346+
resolved "https://registry.npmmirror.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f"
6347+
integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==
6348+
62786349
split-string@^3.0.1, split-string@^3.0.2:
62796350
version "3.1.0"
62806351
resolved "https://registry.npmmirror.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
@@ -6324,6 +6395,11 @@ statuses@~1.5.0:
63246395
resolved "https://registry.npmmirror.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
63256396
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
63266397

6398+
strict-uri-encode@^2.0.0:
6399+
version "2.0.0"
6400+
resolved "https://registry.npmmirror.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
6401+
integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==
6402+
63276403
string-length@^4.0.1:
63286404
version "4.0.2"
63296405
resolved "https://registry.npmmirror.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
@@ -6834,6 +6910,11 @@ walker@^1.0.7, walker@~1.0.5:
68346910
dependencies:
68356911
makeerror "1.0.12"
68366912

6913+
warn-once@^0.1.0:
6914+
version "0.1.0"
6915+
resolved "https://registry.npmmirror.com/warn-once/-/warn-once-0.1.0.tgz#4f58d89b84f968d0389176aa99e0cf0f14ffd4c8"
6916+
integrity sha512-recZTSvuaH/On5ZU5ywq66y99lImWqzP93+AiUo9LUwG8gXHW+LJjhOd6REJHm7qb0niYqrEQJvbHSQfuJtTqA==
6917+
68376918
wcwidth@^1.0.1:
68386919
version "1.0.1"
68396920
resolved "https://registry.npmmirror.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"

0 commit comments

Comments
 (0)