Skip to content
Merged
2 changes: 2 additions & 0 deletions challenges/foundation/02.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,5 @@ Create a better UX to show/hide the password:
- [ ] Add a function to toggle the password visibility.

![password](https://raw.githubusercontent.com/flexbox/react-native-workshop/main/challenges/foundation/password.gif)

- [ ] Check [`Expo.new`](https://expo.dev/onboarding/hello) and try to create a new project. It will setup and deploy everything for you.
7 changes: 7 additions & 0 deletions challenges/react-navigation/02.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ You can use these component to make it pretty:

- [ ] Change the `screenOptions` to display your screen as a `modal`.
- [ ] Add a "close modal" Button with an icon.
- [ ] Add [`expo-dev-tools`](https://docs.expo.dev/debugging/devtools-plugins/#expo-dev-tools-plugins) to your project

- [ ] Look with the `expo-dev-tools` the `route` and `params` of the screen.

Start the project with and open the `expo-dev-tools` with `?` and `shift + m` in your terminal to open the menu and select `@dev-plugins/react-navigation`.

Now you can navigate in your app and see the `route` and `params` of the screen.
1 change: 1 addition & 0 deletions hackathon/spacecraft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
]
},
"dependencies": {
"@dev-plugins/react-navigation": "^0.0.6",
"@expo/metro-runtime": "~3.2.1",
"@expo/vector-icons": "^14.0.0",
"@react-native-async-storage/async-storage": "1.23.1",
Expand Down
15 changes: 13 additions & 2 deletions hackathon/spacecraft/src/navigation/Navigator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { useReactNavigationDevTools } from "@dev-plugins/react-navigation";
import {
NavigationContainer,
useNavigationContainerRef,
} from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";

import { AuthNavigator } from "./AuthNavigator";
Expand All @@ -14,8 +18,15 @@ export const Navigator = () => {
const { user } = useAuthentication();
const appearanceTheme = useAppearanceTheme();

const navigationRef = useNavigationContainerRef();

useReactNavigationDevTools(navigationRef);

return (
<NavigationContainer theme={appearanceTheme}>
<NavigationContainer
ref={navigationRef}
theme={appearanceTheme}
>
<Stack.Navigator screenOptions={{ headerShown: false }}>
{user ? (
<Stack.Screen
Expand Down
51 changes: 46 additions & 5 deletions hackathon/spacecraft/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,14 @@
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==

"@dev-plugins/react-navigation@^0.0.6":
version "0.0.6"
resolved "https://registry.yarnpkg.com/@dev-plugins/react-navigation/-/react-navigation-0.0.6.tgz#46cf1b498aca6a3e0adfd136eaaa4bbfbe73ddab"
integrity sha512-DBuNhCyo0kqYPxZzirL4TZBemOGHBI1pxxF6LOU4WlsVaCK16PJvvtgoD2Tbd0xS64fdfaDyISrn16RbIncy5A==
dependencies:
"@react-navigation/devtools" "^6.0.20"
nanoid "^3.1.23"

"@discoveryjs/json-ext@^0.5.3":
version "0.5.7"
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
Expand Down Expand Up @@ -3197,6 +3205,15 @@
react-is "^16.13.0"
use-latest-callback "^0.1.9"

"@react-navigation/devtools@^6.0.20":
version "6.0.26"
resolved "https://registry.yarnpkg.com/@react-navigation/devtools/-/devtools-6.0.26.tgz#c422c05edfb998d6939317a74a324dd598a2f13b"
integrity sha512-jbIb+678wb75Z1OiA/zP2g7ZuAviL9IFFTiadEcGog713n7XTm5xRr6uiCPWohalUJOvt8e9B8A2wRGmgELjHw==
dependencies:
deep-equal "^2.0.5"
nanoid "^3.1.23"
stacktrace-parser "^0.1.10"

"@react-navigation/elements@^1.3.30":
version "1.3.30"
resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.30.tgz#a81371f599af1070b12014f05d6c09b1a611fd9a"
Expand Down Expand Up @@ -5734,7 +5751,7 @@ arr-union@^3.1.0:
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==

array-buffer-byte-length@^1.0.1:
array-buffer-byte-length@^1.0.0, array-buffer-byte-length@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f"
integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==
Expand Down Expand Up @@ -7579,6 +7596,30 @@ deep-equal@^1.0.1:
object-keys "^1.1.1"
regexp.prototype.flags "^1.5.1"

deep-equal@^2.0.5:
version "2.2.3"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.3.tgz#af89dafb23a396c7da3e862abc0be27cf51d56e1"
integrity sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==
dependencies:
array-buffer-byte-length "^1.0.0"
call-bind "^1.0.5"
es-get-iterator "^1.1.3"
get-intrinsic "^1.2.2"
is-arguments "^1.1.1"
is-array-buffer "^3.0.2"
is-date-object "^1.0.5"
is-regex "^1.1.4"
is-shared-array-buffer "^1.0.2"
isarray "^2.0.5"
object-is "^1.1.5"
object-keys "^1.1.1"
object.assign "^4.1.4"
regexp.prototype.flags "^1.5.1"
side-channel "^1.0.4"
which-boxed-primitive "^1.0.2"
which-collection "^1.0.1"
which-typed-array "^1.1.13"

deep-extend@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
Expand Down Expand Up @@ -8108,7 +8149,7 @@ es-errors@^1.0.0, es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0:
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==

es-get-iterator@^1.0.2:
es-get-iterator@^1.0.2, es-get-iterator@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6"
integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==
Expand Down Expand Up @@ -9508,7 +9549,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==

get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4:
get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd"
integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==
Expand Down Expand Up @@ -10343,7 +10384,7 @@ is-arguments@^1.0.4, is-arguments@^1.1.1:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"

is-array-buffer@^3.0.4:
is-array-buffer@^3.0.2, is-array-buffer@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98"
integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==
Expand Down Expand Up @@ -16933,7 +16974,7 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409"
integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==

which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2, which-typed-array@^1.1.9:
which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2, which-typed-array@^1.1.9:
version "1.1.15"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d"
integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==
Expand Down