Skip to content

Instantly share code, notes, and snippets.

Always Curious!

That Js Dev nishantmendiratta

Always Curious!
View GitHub Profile
m-tymchyk / is-iphone-x.js
Last active Jul 5, 2021
React Native / How to determine if on iPhone X or XR
View is-iphone-x.js
// is-iphone-x.js
import { Dimensions, Platform } from 'react-native';
export function isIphoneX() {
const dim = Dimensions.get('window');
return (
// This has to be iOS
Platform.OS === 'ios' &&