@@ -16,7 +16,6 @@ import type {
16
16
} from 'react-reconciler/src/ReactTestSelectors' ;
17
17
import type { RootType } from './ReactDOMRoot' ;
18
18
import type { ReactScopeInstance } from 'shared/ReactTypes' ;
19
- import type { ReactDOMFundamentalComponentInstance } from '../shared/ReactDOMTypes' ;
20
19
21
20
import {
22
21
precacheFiberNode ,
@@ -64,7 +63,6 @@ import {retryIfBlockedOn} from '../events/ReactDOMEventReplaying';
64
63
65
64
import {
66
65
enableSuspenseServerRenderer ,
67
- enableFundamentalAPI ,
68
66
enableCreateEventHandleAPI ,
69
67
enableScopeAPI ,
70
68
} from 'shared/ReactFeatureFlags' ;
@@ -988,68 +986,6 @@ export function didNotFindHydratableSuspenseInstance(
988
986
}
989
987
}
990
988
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
-
1053
989
export function getInstanceFromNode ( node : HTMLElement ) : null | Object {
1054
990
return getClosestInstanceFromNode ( node ) || null ;
1055
991
}
0 commit comments