Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import {UIManager} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateI
const ReactFabricGlobalResponderHandler = {
onChange: function(from: any, to: any, blockNativeResponder: boolean) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to flow type this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprisingly "handles" like this seem to be consistently any-typed in the ReactNativeRenderer and in the Fabric renderer. So I guess I'm just going to leave as any for now? Seems odd

const fromOrTo = from || to;
const isFabric = !!fromOrTo.stateNode.canonical._internalInstanceHandle;
const fromOrToStateNode = fromOrTo && fromOrTo.stateNode;
const isFabric = !!(
fromOrToStateNode && fromOrToStateNode.canonical._internalInstanceHandle
);

if (isFabric) {
// Noop for now until setJSResponder/clearJSResponder are supported in Fabric
Expand Down