react-native-windows
react-native-windows copied to clipboard
Add Upstream Support for Lack of Dimensions
The Dimensions and indirectly the PixelRatio API is dangerous to use outside of cases where DPI is consistent throughout a system. react-native-win32 intentionally does not correctly implement its functions. We need to patch React Native to get around this. E.g. changing how we calculate hairlineWidth in StyleSheet.win32.js.
We should add upstream support for having this API optionally present, or even better, come up with a plan to provide a better alternative to Dimensions.