Instantly share code, notes, and snippets.

Embed
What would you like to do?
React Native Splashscreen
import React, {Component} from 'react';
import { Modal, View, Text, Image } from 'react-native';
export default class Splashscreen extends Component {
constructor () {
super()
}
render() {
return (
<Modal
animationType="fade"
transparent={false}
visible={this.props.modalVisible}
onRequestClose={() => {
alert('Modal has been closed.');
}}>
<View style={{flex:1, backgroundColor: "#ff6659", justifyContent: 'center', alignItems: 'center',}}>
<Image
style={{ width: 300, height: 300 }}
source={{uri: 'https://image.noelshack.com/fichiers/2018/33/6/1534614310-logo.png'}}/>
</View>
</Modal>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment