Skip to content

Commit df94f0d

Browse files
authored
fix(boilerplate): bump RN 0.74.2 (#2695 by @frankcalise)
* fix(boilerplate): properly wait for fonts to load * fix(boilerplate): @react-native sub packages bump
1 parent 59ef900 commit df94f0d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

boilerplate/app/app.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function App(props: AppProps) {
7171
isRestored: isNavigationStateRestored,
7272
} = useNavigationPersistence(storage, NAVIGATION_PERSISTENCE_KEY)
7373

74-
const [areFontsLoaded] = useFonts(customFontsToLoad)
74+
const [areFontsLoaded, fontLoadError] = useFonts(customFontsToLoad)
7575

7676
const { rehydrated } = useInitialRootStore(() => {
7777
// This runs after the root store has been initialized and rehydrated.
@@ -89,7 +89,9 @@ function App(props: AppProps) {
8989
// In iOS: application:didFinishLaunchingWithOptions:
9090
// In Android: https://stackoverflow.com/a/45838109/204044
9191
// You can replace with your own loading component if you wish.
92-
if (!rehydrated || !isNavigationStateRestored || !areFontsLoaded) return null
92+
if (!rehydrated || !isNavigationStateRestored || (!areFontsLoaded && !fontLoadError)) {
93+
return null
94+
}
9395

9496
const linking = {
9597
prefixes: [prefix],

boilerplate/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
"dependencies": {
3333
"@expo-google-fonts/space-grotesk": "^0.2.2",
3434
"@expo/metro-runtime": "~3.2.1",
35-
"@react-native-async-storage/async-storage": "^1.21.0",
35+
"@react-native-async-storage/async-storage": "1.23.1",
3636
"@react-navigation/bottom-tabs": "^6.3.2",
3737
"@react-navigation/native": "^6.0.2",
3838
"@react-navigation/native-stack": "^6.0.2",
39-
"@shopify/flash-list": "^1.6.3",
39+
"@shopify/flash-list": "^1.6.4",
4040
"apisauce": "3.0.1",
4141
"date-fns": "^2.30.0",
4242
"expo": "~51.0.8",
@@ -54,7 +54,7 @@
5454
"mobx-state-tree": "5.3.0",
5555
"react": "18.2.0",
5656
"react-dom": "18.2.0",
57-
"react-native": "0.74.1",
57+
"react-native": "0.74.2",
5858
"react-native-drawer-layout": "4.0.0-alpha.9",
5959
"react-native-gesture-handler": "~2.16.1",
6060
"react-native-reanimated": "~3.10.1",

0 commit comments

Comments
 (0)