@@ -894,20 +894,14 @@ export function didNotFindHydratableSuspenseInstance(
894894
895895export function mountEventComponent (
896896 eventComponentInstance : ReactEventComponentInstance ,
897- ) : void {
898- if ( enableEventAPI ) {
899- updateEventComponent ( eventComponentInstance ) ;
900- mountEventResponder ( eventComponentInstance ) ;
901- }
902- }
903-
904- export function updateEventComponent (
905- eventComponentInstance : ReactEventComponentInstance ,
906897) : void {
907898 if ( enableEventAPI ) {
908899 const rootContainerInstance = ( ( eventComponentInstance . rootInstance : any ) : Container ) ;
909900 const rootElement = rootContainerInstance . ownerDocument ;
910901 const responder = eventComponentInstance . responder ;
902+ if ( __DEV__ ) {
903+ Object . freeze ( responder ) ;
904+ }
911905 const { rootEventTypes , targetEventTypes } = responder ;
912906 if ( targetEventTypes !== undefined ) {
913907 listenToEventResponderEventTypes ( targetEventTypes , rootElement ) ;
@@ -919,9 +913,16 @@ export function updateEventComponent(
919913 ) ;
920914 listenToEventResponderEventTypes ( rootEventTypes , rootElement ) ;
921915 }
916+ mountEventResponder ( eventComponentInstance ) ;
922917 }
923918}
924919
920+ export function updateEventComponent (
921+ eventComponentInstance : ReactEventComponentInstance ,
922+ ) : void {
923+ // NO-OP, why might use this in the future
924+ }
925+
925926export function unmountEventComponent (
926927 eventComponentInstance : ReactEventComponentInstance ,
927928) : void {
0 commit comments