-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useWindowDimensions hook doesn't work #37704
Comments
In your |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
I am having same issue when i update from expo 50 to 51, My screen width and height does not update while rotating screen and i am using useWindowDimensions hook |
Might be fixed by this #46353 |
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: