react-native : center an Image example

Render

  render() {
    return (
      <View style={styles.splashContainer}>
        <Image
            source={require('./res/img/Catechism-words.png')}>
        </Image>
      </View>
    )
  }

Style

const styles = StyleSheet.create({
  splashContainer: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#00FF7F'
  }
});

No Image, No True

wcsqa

Comments

Popular posts from this blog

How to fix error : no module named sendgrid when try to use sendgrid python lib in PHP.

react-native run-android : sun.security.provider.cert path.SunCertPathBuilderException : unable to find valid certification path to req uested target

react-native run-android : do not build/update modified code(App.js)