mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
00d5674474
Summary: As per janicduplessis recommendation, provide a new synchronous method to replace the necessary synchronous calls and use a warning in the comments (and method name). **Motivation** There are currently a number of XCode warnings that show up in a fresh 0.40 install of a react native project. While the project can still be run, this contributes negatively to the development experience -- valid warnings may be ignored and new ones may be added as per https://en.wikipedia.org/wiki/Broken_windows_theory This addresses one of the warnings, by providing the functionality of a deprecated method in two specific cases where we can't avoid doing synchronous work on the main queue. See https://github.com/facebook/react-native/issues/11736 for more context. **Test plan (required)** I ran a project that relied on screen size and it didn't crash...happy to do more involved testing if someone can share better methodology. Closes https://github.com/facebook/react-native/pull/11817 Differential Revision: D4402911 fbshipit-source-id: 9fd8b3f50d34984b765fe22b1f4512e103ba55a9