Question · React Native course · Module 2: Lists and styles
Dimensions API
How do you get the screen width using the Dimensions API?
Answer options
- Dimensions.get('window').width
- Dimensions.width
- Screen.getWidth()
- window.innerWidth
Show the answer
Correct answer:
- Dimensions.get('window').width