From 5740b5f83fe50b4132000351ba1629b2b788d349 Mon Sep 17 00:00:00 2001 From: jerrydev0927 Date: Wed, 22 Mar 2023 17:59:43 +0000 Subject: [PATCH] Remove ReactFabricPublicInstance and used definition from ReactNativePrivateInterface (#26437) ## Summary Now that React Native owns the definition for public instances in Fabric and ReactNativePrivateInterface provides the methods to create instances and access private fields (see https://github.com/facebook/react-native/pull/36570), we can remove the definitions from React. After this PR, React Native public instances will be opaque types for React and it will only handle their creation but not their definition. This will make RN similar to DOM in how public instances are handled. This is a new version of #26418 which was closed without merging. ## How did you test this change? * Existing tests. * Manually synced the changes in this PR to React Native and tested it end to end in Meta's infra. DiffTrain build for [9c54b29b44d24f8f8090da9c7ebf569747a444df](https://github.com/facebook/react/commit/9c54b29b44d24f8f8090da9c7ebf569747a444df) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/WARNINGS | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index b0bbc865ab..51ceb6c713 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -f77099b6f1ccc658eff3467c6b9337e1b77ec854 +9c54b29b44d24f8f8090da9c7ebf569747a444df diff --git a/compiled/facebook-www/WARNINGS b/compiled/facebook-www/WARNINGS index a285210d95..8004d6e9b7 100644 --- a/compiled/facebook-www/WARNINGS +++ b/compiled/facebook-www/WARNINGS @@ -328,7 +328,6 @@ "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s" "Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s" "Warning: ref.measureLayout must be called with a node handle or a ref to a native component." -"Warning: ref.measureLayout must be called with a ref to a native component." "We should not be hydrating here. This is a bug in React. Please file a bug." "You are accessing \"digest\" from the errorInfo object passed to onRecoverableError. This property is deprecated and will be removed in a future version of React. To access the digest of an Error look for this property on the Error instance itself." "You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?"