removed splashscreen dependency (deprecated)
This commit is contained in:
		
							parent
							
								
									3c62e1e04b
								
							
						
					
					
						commit
						977d4bcbc9
					
				| 
						 | 
				
			
			@ -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 <AppLoading />;
 | 
			
		||||
        if(this.state.isReady) {
 | 
			
		||||
           SplashScreen.hideAsync();
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        const screenOptions = {
 | 
			
		||||
            headerShown: false,
 | 
			
		||||
        };
 | 
			
		||||
| 
						 | 
				
			
			@ -137,7 +141,7 @@ export default class App extends React.Component {
 | 
			
		|||
 | 
			
		||||
        return (
 | 
			
		||||
            <Provider store={store}>
 | 
			
		||||
                <PersistGate loading={<AppLoading />} persistor={persistor}>
 | 
			
		||||
                <PersistGate persistor={persistor}>
 | 
			
		||||
                    <NavigationContainer >
 | 
			
		||||
                        <Stack.Navigator >
 | 
			
		||||
                            {activeView}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue