From 977d4bcbc99acbf9639ee1e1451ed31bf195497e Mon Sep 17 00:00:00 2001 From: Martin Bauer Date: Sat, 28 Oct 2023 14:06:08 +0200 Subject: [PATCH] removed splashscreen dependency (deprecated) --- SwimTracker/App.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SwimTracker/App.js b/SwimTracker/App.js index 1c99e85..92c0e78 100644 --- a/SwimTracker/App.js +++ b/SwimTracker/App.js @@ -1,5 +1,5 @@ import React from 'react'; -import AppLoading from 'expo-app-loading'; +import * as SplashScreen from 'expo-splash-screen'; import { Ionicons } from '@expo/vector-icons'; import * as Font from 'expo-font'; @@ -37,6 +37,9 @@ const store = createStore(persistedReducer); const persistor = persistStore(store); const Stack = createStackNavigator(); +// Keep the splash screen visible while we fetch resources +SplashScreen.preventAutoHideAsync(); + export default class App extends React.Component { constructor(props) { super(props); @@ -70,9 +73,10 @@ export default class App extends React.Component { } render() { - if (!this.state.isReady) { - return ; + if(this.state.isReady) { + SplashScreen.hideAsync(); } + const screenOptions = { headerShown: false, }; @@ -137,8 +141,8 @@ export default class App extends React.Component { return ( - } persistor={persistor}> - + + {activeView}