mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
57c1a7add2
Summary: `setupDevtools.js` is accessing `AppState.currentState` without checking its availability. In environments where 1) `__DEV__ == true`, and 2) no `RCTAppState` native module is provided thus resorting to `MissingNativeAppStateShim`, this will result in an exception: ```Cannot use 'AppState' module when native 'RCTAppState' is not included in the build. Either include it, or check 'AppState'.isAvailable before calling any methods.``` (Interestingly, `MissingNativeAppStateShim.currentState` did have a [default `null` value](https://github.com/facebook/react-native/commit/118e88393e389ff70e30ada10a69b72dd31d869a#diff-305b5180aa6ccc876ede6767de1fbfc4R192) that was [later removed](https://github.com/facebook/react-native/commit/a93b7a2da0849f15708afef1ff99022d8cc55b14#diff-305b5180aa6ccc876ede6767de1fbfc4R186).) **Update**: Following cpojer's suggestion of reverting https://github.com/facebook/react-native/commit/a93b7a2da0849f15708afef1ff99022d8cc55b14. Title also updated to reflect this. [General] [Fixed] - Remove MissingNativeRCTNetworkingShim; revert MissingNativeAppStateShim Pull Request resolved: https://github.com/facebook/react-native/pull/24380 Differential Revision: D14932658 Pulled By: cpojer fbshipit-source-id: aef7ca566b3b8660eaed74a8ba3b6b0117b1200c