feat: support isChildPublicInstance from renderer (#41806)

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

Changelog: [Internal]

Adds `isChildPublicInstance` to renderers implementations, which makes it available for usage from `RendererProxy`.

Reviewed By: rubennorte

Differential Revision: D51822905

fbshipit-source-id: 3ac92ead9d31dd3c7e5e7764daf27fe5f0eca942
This commit is contained in:
Ruslan Lesiutin 2023-12-06 05:22:10 -08:00 коммит произвёл Facebook GitHub Bot
Родитель db609ff0c6
Коммит 78c8681884
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -9,6 +9,7 @@
*/
import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
import type ReactFabricHostComponent from './ReactFabricPublicInstance/ReactFabricHostComponent';
import type {Element, ElementRef, ElementType} from 'react';
import {type RootTag} from './RootTag';
@ -110,3 +111,13 @@ export function unstable_batchedUpdates<T>(
export function isProfilingRenderer(): boolean {
return Boolean(__DEV__);
}
export function isChildPublicInstance(
parentInstance: ReactFabricHostComponent | HostComponent<mixed>,
childInstance: ReactFabricHostComponent | HostComponent<mixed>,
): boolean {
return require('../Renderer/shims/ReactNative').isChildPublicInstance(
parentInstance,
childInstance,
);
}