From 06b97ca28e78a33a550e765efaf5066601c6729c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Wed, 15 Mar 2023 11:38:15 -0700 Subject: [PATCH] Back out "React Native sync for revisions fccf3a9...47cf4e5" Summary: There's some problem in the last sync that changes the memoization behavior in some product code. We'll revert and investigate. Changelog: [internal] Reviewed By: bvanderhoof Differential Revision: D44100907 fbshipit-source-id: 233b478dd6f2f29121ac05323047ab6099b6b56c --- Libraries/Renderer/REVISION | 2 +- Libraries/Renderer/shims/ReactNativeTypes.js | 41 +++++++------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/Libraries/Renderer/REVISION b/Libraries/Renderer/REVISION index 49a6dd22aec..b808372b018 100644 --- a/Libraries/Renderer/REVISION +++ b/Libraries/Renderer/REVISION @@ -1 +1 @@ -47cf4e578c2d8eef9c6cc27105ce560307999244 \ No newline at end of file +fccf3a9fba5fd778c678657c556344b333111cfb \ No newline at end of file diff --git a/Libraries/Renderer/shims/ReactNativeTypes.js b/Libraries/Renderer/shims/ReactNativeTypes.js index 7ae1c1f788f..403452ef41a 100644 --- a/Libraries/Renderer/shims/ReactNativeTypes.js +++ b/Libraries/Renderer/shims/ReactNativeTypes.js @@ -6,7 +6,7 @@ * * @noformat * @flow strict - * @generated SignedSource<<4df0c7d45c633ce1409906d78ee6813c>> + * @generated SignedSource<<265b342f0d29323bebb711ba0bc882ec>> * * This file was sync'd from the facebook/react repository. */ @@ -98,23 +98,7 @@ export type PartialViewConfig = $ReadOnly<{ validAttributes?: PartialAttributeConfiguration, }>; -/** - * Current usages should migrate to this definition - */ -export interface INativeMethods { - blur(): void; - focus(): void; - measure(callback: MeasureOnSuccessCallback): void; - measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; - measureLayout( - relativeToNativeNode: number | ElementRef>, - onSuccess: MeasureLayoutOnSuccessCallback, - onFail?: () => void, - ): void; - setNativeProps(nativeProps: {...}): void; -} - -export type NativeMethods = $ReadOnly<{| +export type NativeMethods = $ReadOnly<{ blur(): void, focus(): void, measure(callback: MeasureOnSuccessCallback): void, @@ -125,11 +109,7 @@ export type NativeMethods = $ReadOnly<{| onFail?: () => void, ): void, setNativeProps(nativeProps: {...}): void, -|}>; - -// This validates that INativeMethods and NativeMethods stay in sync using Flow! -declare var ensureNativeMethodsAreSynced: NativeMethods; -(ensureNativeMethodsAreSynced: INativeMethods); +}>; export type HostComponent = AbstractComponent>; @@ -215,8 +195,6 @@ export type ReactNativeType = { ... }; -export opaque type Node = mixed; - export type ReactFabricType = { findHostInstance_DEPRECATED( componentOrHandle: ?(ElementRef | number), @@ -240,7 +218,18 @@ export type ReactFabricType = { concurrentRoot: ?boolean, ): ?ElementRef, unmountComponentAtNode(containerTag: number): void, - getNodeFromInternalInstanceHandle(internalInstanceHandle: mixed): ?Node, + ... +}; + +export type ReactNativeEventTarget = { + node: {...}, + canonical: { + _nativeTag: number, + viewConfig: ViewConfig, + currentProps: {...}, + _internalInstanceHandle: {...}, + ... + }, ... };