SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 155 C++

fix: add isChildPublicInstance to ReactNativeTypes (#27788) (#41807)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41807

Changelog: [Internal]

Follow-up on https://github.com/facebook/react/pull/27783.

React Native is actually using `ReactNativeTypes`, which are synced from
this repo. In order to make `isChildPublicInstance` visible for
renderers inside React Native repository, we need to list it in
`ReactNativeTypes`.

Because of current circular dependency between React Native and React,
it is impossible to actually type it properly:
- Can't import any types in `ReactNativeTypes` from local files, because
it will break React Native, once synced.
- Implementations can't use real types in their definitions, because it
will break these checks:

https://github.com/facebook/react/blob/223db40d5a04dc3311f963f5296675f7f43139e8/packages/react-native-renderer/fabric.js#L12-L13

https://github.com/facebook/react/blob/223db40d5a04dc3311f963f5296675f7f43139e8/packages/react-native-renderer/index.js#L12-L14

DiffTrain build for commit https://github.com/facebook/react/commit/c29ca23af91d8aeb9e175c08a0866ba54286f0f3.

Test Plan: Sandcastle tests

Reviewed By: kassens

Differential Revision: D51849040

Pulled By: hoxyq

fbshipit-source-id: f75593e44c114289ad4c6fb8b4b37c4c5fd6d3d4
H
hoxyq (Meta Employee) committed
616a9077985e18ed077d7db4d47740be0d2e6cd4
Parent: 73d0cf5
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 12/6/2023, 2:04:40 AM