1. /**
    
  2.  * Copyright (c) Meta Platforms, Inc. and affiliates.
    
  3.  *
    
  4.  * This source code is licensed under the MIT license found in the
    
  5.  * LICENSE file in the root directory of this source tree.
    
  6.  *
    
  7.  * @flow
    
  8.  */
    
  9. 
    
  10. // Module provided by RN:
    
  11. import {UIManager} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface';
    
  12. 
    
  13. const ReactNativeGlobalResponderHandler = {
    
  14.   onChange: function (from: any, to: any, blockNativeResponder: boolean) {
    
  15.     if (to !== null) {
    
  16.       const tag = to.stateNode._nativeTag;
    
  17.       UIManager.setJSResponder(tag, blockNativeResponder);
    
  18.     } else {
    
  19.       UIManager.clearJSResponder();
    
  20.     }
    
  21.   },
    
  22. };
    
  23. 
    
  24. export default ReactNativeGlobalResponderHandler;