Skip to content

Glossary: React Native

useWindowDimensions

Also written: useColorScheme

A hook giving the current screen `width` and `height` in dp, updating when the phone turns. The related `useColorScheme()` tells you whether the phone is set to light or dark.

Where the book teaches it

Related terms

Density-independent pixels (dp)Platform.OS, Platform.select