@@ -894,20 +894,14 @@ export function didNotFindHydratableSuspenseInstance(
894
894
895
895
export function mountEventComponent (
896
896
eventComponentInstance : ReactEventComponentInstance ,
897
- ) : void {
898
- if ( enableEventAPI ) {
899
- updateEventComponent ( eventComponentInstance ) ;
900
- mountEventResponder ( eventComponentInstance ) ;
901
- }
902
- }
903
-
904
- export function updateEventComponent (
905
- eventComponentInstance : ReactEventComponentInstance ,
906
897
) : void {
907
898
if ( enableEventAPI ) {
908
899
const rootContainerInstance = ( ( eventComponentInstance . rootInstance : any ) : Container ) ;
909
900
const rootElement = rootContainerInstance . ownerDocument ;
910
901
const responder = eventComponentInstance . responder ;
902
+ if ( __DEV__ ) {
903
+ Object . freeze ( responder ) ;
904
+ }
911
905
const { rootEventTypes , targetEventTypes } = responder ;
912
906
if ( targetEventTypes !== undefined ) {
913
907
listenToEventResponderEventTypes ( targetEventTypes , rootElement ) ;
@@ -919,9 +913,16 @@ export function updateEventComponent(
919
913
) ;
920
914
listenToEventResponderEventTypes ( rootEventTypes , rootElement ) ;
921
915
}
916
+ mountEventResponder ( eventComponentInstance ) ;
922
917
}
923
918
}
924
919
920
+ export function updateEventComponent (
921
+ eventComponentInstance : ReactEventComponentInstance ,
922
+ ) : void {
923
+ // NO-OP, why might use this in the future
924
+ }
925
+
925
926
export function unmountEventComponent (
926
927
eventComponentInstance : ReactEventComponentInstance ,
927
928
) : void {
0 commit comments