Skip to content

Instantly share code, notes, and snippets.

@coolnalu
Created January 16, 2018 00:17
Show Gist options
  • Save coolnalu/d74a91b0ba19722edd01422e25ad14ac to your computer and use it in GitHub Desktop.
Save coolnalu/d74a91b0ba19722edd01422e25ad14ac to your computer and use it in GitHub Desktop.
Safe Area in React Native
import React, {Component} from 'react';
import {SafeAreaView, StyleSheet, View} from 'react-native';
// https://medium.com/react-native-training/react-native-iphonex-92ff511282af
export default class App extends Component < {} > {
render() {
return (<SafeAreaView style={styles.safeArea}>
<View/>
</SafeAreaView>);
}
}
const styles = StyleSheet.create({
safeArea: {
flex: 1
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment