Skip to content

Files

Latest commit

06f1bef · Oct 24, 2018

History

History
12 lines (7 loc) · 247 Bytes

screen-height-width.md

File metadata and controls

12 lines (7 loc) · 247 Bytes

To access a screen height and width in React Native, import Dimension.

Code:


import { Dimensions } from 'react-native'

const SCREEN_WIDTH = Dimensions.get('window').width
const SCREEN_HEIGHT = Dimensions.get('window').height