-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Closed
Labels
API: DimensionsGood first issueInterested in collaborating? Take a stab at fixing one of these issues.Interested in collaborating? Take a stab at fixing one of these issues.Needs: Triage 🔍
Description
Description
When running an app built for iOS on your Apple Silicon Mac, the dimensions doesn't update when resizing the window. Only after focusing another application does it update.
(see also #30648)
Version
0.70.5
Output of npx react-native info
System:
OS: macOS 13.1
CPU: (8) arm64 Apple M1
Memory: 104.56 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.19 - ~/coding/loco/order/node_modules/.bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Watchman: 2022.12.26.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: javac 17 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.5 => 0.70.5
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
- Create a new React Native project and replace the app.js file with the code below.
- Build and run on an Apple Silicon / M1 Mac and resize the window.
- Observe that the numbers aren't changing.
Snack, code example, screenshot, or link to a repository
import { Text, View, useWindowDimensions } from 'react-native'
export default function App() {
const { width, height } = useWindowDimensions()
return (
<View style={{ padding: 64 }}>
<Text>width: {width}, height: {height}</Text>
</View>
)
}kesha-antonov, adamhari, Shervanator and farhanfahrezi
Metadata
Metadata
Assignees
Labels
API: DimensionsGood first issueInterested in collaborating? Take a stab at fixing one of these issues.Interested in collaborating? Take a stab at fixing one of these issues.Needs: Triage 🔍