react-native-detect-device
v0.0.1
Published
Class to let your app figure out what type of device is being used (iOS/Android, Phone/Tablet).
Downloads
34
Readme
react-native-detect-device
About
The class was written to simplify the process of determining what platform was currently running.
Install
npm install react-native-detect-device --save
Usage
Import into a project file:
Require Import: const Device = require('react-native-device-detection');
ES6 Modules: import { isAndroid } from 'react-native-device-detection
;
You can also use it anywhere else in your code where you need to differentiate between platforms.
Available props:
- pixelDensity
- width
- height
- isIos
- isAndroid
- isPhone
- isTablet
- isIphoneX