How do I get screen width in React native?
(I need it because I use some absolute components that overlap and their position on screen changes with different device
Simply declare this code to get device width
let deviceWidth = Dimensions.get('window').width
Maybe it's obviously but, Dimensions is an react-native import
import { Dimensions } from 'react-native'
Dimensions will not work without that