mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42708 When pressing `r` on simulator in Bridgeless mode, we have a race condition between: - RCTKeyCommands evaluating the blocks to be invoked - ReactNative invalidating the DevMenu with the list of RCTKeyCommands (on which ReactNative is iterating). The fix checks which commands need to be executed, stores them in an array and then iterates on the array, which is local to the function call, avoiding any concurrency issue. ## Changelog: [iOS][Fixed] - Refactored RCT_handleKeyCommand to avoid concurrency issues Reviewed By: motiz88 Differential Revision: D53186262 fbshipit-source-id: 60ae8974a9df7289395c8a9e9abe2e34e4c40309