@@ -16,7 +16,6 @@ import type {
1616} from 'react-reconciler/src/ReactTestSelectors' ;
1717import type { RootType } from './ReactDOMRoot' ;
1818import type { ReactScopeInstance } from 'shared/ReactTypes' ;
19- import type { ReactDOMFundamentalComponentInstance } from '../shared/ReactDOMTypes' ;
2019
2120import {
2221 precacheFiberNode ,
@@ -64,7 +63,6 @@ import {retryIfBlockedOn} from '../events/ReactDOMEventReplaying';
6463
6564import {
6665 enableSuspenseServerRenderer ,
67- enableFundamentalAPI ,
6866 enableCreateEventHandleAPI ,
6967 enableScopeAPI ,
7068} from 'shared/ReactFeatureFlags' ;
@@ -988,68 +986,6 @@ export function didNotFindHydratableSuspenseInstance(
988986 }
989987}
990988
991- export function getFundamentalComponentInstance (
992- fundamentalInstance : ReactDOMFundamentalComponentInstance ,
993- ) : Instance {
994- if ( enableFundamentalAPI ) {
995- const { currentFiber , impl , props , state } = fundamentalInstance ;
996- const instance = impl . getInstance ( null , props , state ) ;
997- precacheFiberNode ( currentFiber , instance ) ;
998- return instance ;
999- }
1000- // Because of the flag above, this gets around the Flow error;
1001- return ( null : any ) ;
1002- }
1003-
1004- export function mountFundamentalComponent (
1005- fundamentalInstance : ReactDOMFundamentalComponentInstance ,
1006- ) : void {
1007- if ( enableFundamentalAPI ) {
1008- const { impl , instance , props , state } = fundamentalInstance ;
1009- const onMount = impl . onMount ;
1010- if ( onMount !== undefined ) {
1011- onMount ( null , instance , props , state ) ;
1012- }
1013- }
1014- }
1015-
1016- export function shouldUpdateFundamentalComponent (
1017- fundamentalInstance : ReactDOMFundamentalComponentInstance ,
1018- ) : boolean {
1019- if ( enableFundamentalAPI ) {
1020- const { impl , prevProps , props , state } = fundamentalInstance ;
1021- const shouldUpdate = impl . shouldUpdate ;
1022- if ( shouldUpdate !== undefined ) {
1023- return shouldUpdate ( null , prevProps , props , state ) ;
1024- }
1025- }
1026- return true ;
1027- }
1028-
1029- export function updateFundamentalComponent (
1030- fundamentalInstance : ReactDOMFundamentalComponentInstance ,
1031- ) : void {
1032- if ( enableFundamentalAPI ) {
1033- const { impl , instance , prevProps , props , state } = fundamentalInstance ;
1034- const onUpdate = impl . onUpdate ;
1035- if ( onUpdate !== undefined ) {
1036- onUpdate ( null , instance , prevProps , props , state ) ;
1037- }
1038- }
1039- }
1040-
1041- export function unmountFundamentalComponent (
1042- fundamentalInstance : ReactDOMFundamentalComponentInstance ,
1043- ) : void {
1044- if ( enableFundamentalAPI ) {
1045- const { impl , instance , props , state } = fundamentalInstance ;
1046- const onUnmount = impl . onUnmount ;
1047- if ( onUnmount !== undefined ) {
1048- onUnmount ( null , instance , props , state ) ;
1049- }
1050- }
1051- }
1052-
1053989export function getInstanceFromNode ( node : HTMLElement ) : null | Object {
1054990 return getClosestInstanceFromNode ( node ) || null ;
1055991}
0 commit comments