use window dimensions react native code example
Example 1: react native dimensions window vs screen
const screenHeight = Math.round(Dimensions.get('window').height);
Example 2: react native dimensions window vs screen
const screenWidth = Math.round(Dimensions.get('window').width);