useWindowDimensions hook doesn't work #37704
Labels
API: Dimensions
Needs: Triage 🔍
Stale
There has been a lack of activity on this issue and it may be closed soon.
Description
The values returned from
useWindowDimensions()
hook doesn't update correctly on iOS simulator or device.React Native Version
0.71.8
Output of
npx react-native info
Steps to reproduce
npx create-expo-app RNUseWindowsDimensions cd RNUseWindowsDimensions npm run ios
./App.js
with example code for documentation of useWindowDimensions here.In this demo we see that the height value is always greater than the width value, even when the simulator is in landscape orientation.
https://monosnap.com/file/1ByKEEd9VJqVraQUm98SUtjYzQmet4
Snack, code example, screenshot, or link to a repository
https://monosnap.com/file/1ByKEEd9VJqVraQUm98SUtjYzQmet4
I think it may be related to issue #29290. In that issue the op states values are swapped. In this case values are simply wrong. Thus I thought it was worth opening up a new issue.
The text was updated successfully, but these errors were encountered: