Learn to read screen size with Dimensions.get('window').
import { Dimensions } from 'react-native'; const width = Dimensions.width; export default width;
What is the bug in this code?