I have a fullscreen image I would like to display when my app state is loading. How can set this up?
I would like to implement something like this:
if (videos == "") {
return (
<View style={styles.imageContainer}>
<Image
style={styles.image}
source={require("../assets/images/tc-logo.png")}
/>
</View>
);
}
My current app.js looks like this
export default class App extends React.Component {
runInitialAppStartActions = () => {
store.dispatch(fetchData());
};
render() {
return (
<ImageBackground
source={require("./assets/images/TC_background.jpg")}
style={styles.container}
>
<Provider store={store}>
<PersistGate
loading={null}
persistor={persistor}
onBeforeLift={this.runInitialAppStartActions}
>
<AppNavigator
ref={navigatorRef => {
NavigationService.setTopLevelNavigator(navigatorRef);
}}
/>
</PersistGate>
</Provider>
</ImageBackground>
);
}
}