Skip to content
This repository was archived by the owner on Jul 22, 2026. It is now read-only.

Commit 3828661

Browse files
Merge pull request #84 from expo-community/aman/upgrade-to-sdk50
Upgrade to Expo SDK 50
2 parents f191669 + b2d6e7b commit 3828661

27 files changed

Lines changed: 979 additions & 2390 deletions

.expo-shared/assets.json

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

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@ Temporary Items
3939
.apdisk
4040

4141
# Project related
42-
.env
42+
.env
43+
.expo
44+
.expo-shared
45+
.vscode

.watchmanconfig

Lines changed: 0 additions & 1 deletion
This file was deleted.

App.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React from 'react';
2-
import { SafeAreaProvider } from 'react-native-safe-area-context';
1+
import React from "react";
2+
import { SafeAreaProvider } from "react-native-safe-area-context";
33

4-
import { RootNavigator } from './navigation/RootNavigator';
5-
import { AuthenticatedUserProvider } from './providers';
4+
import { RootNavigator } from "./navigation/RootNavigator";
5+
import { AuthenticatedUserProvider } from "./providers";
66

77
const App = () => {
88
return (

README.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
Is a quicker way to start with Expo + Firebase (using JS SDK) projects. It includes:
88

9-
- based on Expo SDK `46`
9+
- based on Expo SDK `50`
1010
- navigation using `react-navigation` 6.x.x
1111
- Firebase JS SDK v9
1212
- Firebase as the backend for email auth
1313
- custom and reusable components
1414
- custom hook to toggle password field visibility on a TextInput
1515
- handles server errors using Formik
1616
- Login, Signup & Password Reset form built using Formik & yup
17-
- show/hide Password Field's visibility 👁
17+
- show/hide the Password Field's visibility 👁
1818
- uses a custom Provider using Context API & Firebase's `onAuthStateChanged` handler to check the user's auth state with
19-
- handles Forgot Password Reset using Firebase email method
19+
- handles Forgot Password Reset using the Firebase email method
2020
- uses [Expo Vector Icons](https://icons.expo.fyi/)
2121
- uses [KeyboardAwareScrollView](https://github.com/APSL/react-native-keyboard-aware-scroll-view) package to handle keyboard appearance and automatically scrolls to focused TextInput
2222
- uses `dotenv` and `expo-constants` packages to manage environment variables (so that they are not exposed on public repositories)
@@ -44,10 +44,25 @@ MESSAGING_SENDER_ID=XXXX
4444
APP_ID=XXXX
4545
```
4646

47-
4. Start the project:
47+
## Run project
4848

49-
- `yarn ios` -- open on iOS
50-
- `yarn android` -- open on Android
49+
To start the development server and run your project:
50+
51+
```
52+
npx expo start
53+
```
54+
55+
Alternate to using Expo Go, if you are building more than a hobby project or a prototype, make sure you [create a development build](https://docs.expo.dev/develop/development-builds/introduction/). You can either [locally compile your project](https://docs.expo.dev/guides/local-app-development/#local-builds-with-expo-dev-client) or [use EAS](https://docs.expo.dev/develop/development-builds/create-a-build/).
56+
57+
To locally compile your app, run:
58+
59+
```
60+
# Build native Android project
61+
npx expo run:android
62+
63+
# Build native iOS project
64+
npx expo run:ios
65+
```
5166

5267
## File Structure
5368

@@ -93,17 +108,17 @@ Main screens:
93108
- Forgot password
94109
- Home (Bare Minimum) with a logout button
95110

96-
![Login screen with validation](https://i.imgur.com/cydaOYN.png)
111+
<img src="./screenshots/img1.png" height="420" alt="Login screen with validation>
97112

98-
![Successful Signup](https://i.imgur.com/62kcirI.png)
113+
<img src="./screenshots/img2.png" height="420" alt="Successful sign up attempt">
99114

100-
![Forgot Password](https://i.imgur.com/9J9a4Nl.png)
115+
<img src="./screenshots/img3.png" height="420" alt="Forgot password screen">
101116

102-
![Validation on Signup screens](https://i.imgur.com/DG0wTjG.png)
117+
<img src="./screenshots/img3.png" height="420" alt="Validation on Signup screens">
103118

104119
## Development builds and React Native Firebase library
105120

106-
This project uses Firebase JS SDK which doesn't support all services (such as Crashlytics, Dynamic Links, and Analytics). However, you can use `react-native-firebase` library in an Expo project by [creating a development build](https://docs.expo.dev/develop/development-builds/introduction/).
121+
This project uses Firebase JS SDK which doesn't support all services (such as Crashlytics, Dynamic Links, and Analytics). However, you can use the `react-native-firebase` library in an Expo project by [creating a development build](https://docs.expo.dev/develop/development-builds/introduction/).
107122

108123
Both of these libraries can satisfy different project requirements. To learn about the differences between using Firebase JS SDK and React Native Firebase library when building your app with Expo, see the following sections from Expo's official documentation:
109124

app.config.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
import 'dotenv/config';
1+
import "dotenv/config";
22

33
export default {
44
expo: {
5-
name: 'Expo Firebase Starter',
6-
slug: 'expo-firebase',
7-
privacy: 'public',
8-
platforms: ['ios', 'android'],
9-
version: '0.15.0',
10-
orientation: 'portrait',
11-
icon: './assets/flame.png',
5+
name: "Expo Firebase Starter",
6+
slug: "expo-firebase",
7+
privacy: "public",
8+
platforms: ["ios", "android"],
9+
version: "0.15.0",
10+
orientation: "portrait",
11+
icon: "./assets/flame.png",
1212
splash: {
13-
image: './assets/splash.png',
14-
resizeMode: 'cover',
15-
backgroundColor: '#F57C00'
13+
image: "./assets/splash.png",
14+
resizeMode: "cover",
15+
backgroundColor: "#F57C00",
1616
},
1717
updates: {
18-
fallbackToCacheTimeout: 0
18+
fallbackToCacheTimeout: 0,
1919
},
20-
assetBundlePatterns: ['**/*'],
20+
assetBundlePatterns: ["**/*"],
2121
ios: {
22-
supportsTablet: true
22+
supportsTablet: true,
2323
},
2424
extra: {
2525
apiKey: process.env.API_KEY,
2626
authDomain: process.env.AUTH_DOMAIN,
2727
projectId: process.env.PROJECT_ID,
2828
storageBucket: process.env.STORAGE_BUCKET,
2929
messagingSenderId: process.env.MESSAGING_SENDER_ID,
30-
appId: process.env.APP_ID
31-
}
32-
}
30+
appId: process.env.APP_ID,
31+
},
32+
},
3333
};

babel.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ module.exports = function (api) {
22
api.cache(true);
33
return {
44
presets: ["babel-preset-expo"],
5-
plugins: ["react-native-reanimated/plugin"],
65
};
76
};

config/firebase.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { initializeApp } from "firebase/app";
2-
// import { initializeAuth, getReactNativePersistence } from "firebase/auth";
3-
import { initializeAuth } from "firebase/auth";
2+
import { initializeAuth, getReactNativePersistence } from "firebase/auth";
43
import Constants from "expo-constants";
5-
// import AsyncStorage from "@react-native-async-storage/async-storage";
4+
import AsyncStorage from "@react-native-async-storage/async-storage";
65

76
// add firebase config
87
const firebaseConfig = {
@@ -17,15 +16,9 @@ const firebaseConfig = {
1716
// initialize firebase
1817
const app = initializeApp(firebaseConfig);
1918

20-
//
21-
// Need to upgrade to Expo with typescrip inorder getReactNativePersistence to work.
22-
//
23-
24-
//initialize auth
25-
// const auth = initializeAuth(app, {
26-
// persistence: getReactNativePersistence(AsyncStorage),
27-
// });
28-
29-
const auth = initializeAuth(app);
19+
// initialize auth
20+
const auth = initializeAuth(app, {
21+
persistence: getReactNativePersistence(AsyncStorage),
22+
});
3023

3124
export { auth };

config/images.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const Images = {
2-
logo: require('../assets/flame.png')
2+
logo: require("../assets/flame.png"),
33
};

config/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Images } from './images';
2-
import { Colors } from './theme';
3-
import { auth } from './firebase';
1+
import { Images } from "./images";
2+
import { Colors } from "./theme";
3+
import { auth } from "./firebase";
44

55
export { Images, Colors, auth };

0 commit comments

Comments
 (0)