Dimensions
useWindowDimensions
automatically updates the width and height values when the screen is resized. You can get the width and height of the application window like this:
const windowWidth = useWindowDimensions().width
const windowHeight = useWindowDimensions().height
Example
This is usually necessary in order to make the properties dynamic.
Questions
What is the name of the hook for determining the value of the width and height when the screen is resized?
useDimensions
winDimensions
useWindowDimensions
To see how well you learned this lesson, take the test in the mobile application of our school on this topic or in the telegram bot.
Links:
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Dmitriy Vasilev 💲 |