From 9fe1031244903e442de179821f1d383a9f2a59f2 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Wed, 18 Dec 2019 10:24:46 +0000 Subject: [PATCH] [react-interactions] Rename Flare APIs to deprecated and remove from RN (#17644) --- .../legacy-events/ReactGenericBatching.js | 4 +- packages/react-art/src/ReactARTHostConfig.js | 4 +- .../ReactHooksInspection-test.internal.js | 6 +- ...DOMServerPartialHydration-test.internal.js | 28 +- .../react-dom/src/client/ReactDOMComponent.js | 16 +- .../src/client/ReactDOMHostConfig.js | 20 +- ...s => DeprecatedDOMEventResponderSystem.js} | 12 +- .../src/events/ReactDOMEventListener.js | 12 +- .../src/events/ReactDOMEventReplaying.js | 4 +- .../DOMEventResponderSystem-test.internal.js | 68 +-- .../src/events/checkPassiveEvents.js | 4 +- .../src/server/ReactPartialRenderer.js | 4 +- packages/react-dom/src/shared/DOMProperty.js | 4 +- .../shared/ReactControlledValuePropTypes.js | 6 +- .../__tests__/FocusContain-test.internal.js | 2 +- .../src/__tests__/FocusGroup-test.internal.js | 2 +- .../__tests__/FocusManager-test.internal.js | 2 +- .../src/__tests__/FocusTable-test.internal.js | 2 +- packages/react-interactions/events/README.md | 2 +- .../events/src/dom/ContextMenu.js | 4 +- .../react-interactions/events/src/dom/Drag.js | 4 +- .../events/src/dom/Focus.js | 8 +- .../events/src/dom/Hover.js | 4 +- .../events/src/dom/Input.js | 4 +- .../events/src/dom/Keyboard.js | 4 +- .../events/src/dom/PressLegacy.js | 4 +- .../events/src/dom/Scroll.js | 4 +- .../events/src/dom/Swipe.js | 4 +- .../react-interactions/events/src/dom/Tap.js | 4 +- .../__tests__/ContextMenu-test.internal.js | 2 +- .../src/dom/__tests__/Drag-test.internal.js | 2 +- .../src/dom/__tests__/Focus-test.internal.js | 2 +- .../__tests__/FocusWithin-test.internal.js | 2 +- .../src/dom/__tests__/Hover-test.internal.js | 2 +- .../src/dom/__tests__/Input-test.internal.js | 2 +- .../dom/__tests__/Keyboard-test.internal.js | 2 +- .../MixedResponders-test-internal.js | 2 +- .../src/dom/__tests__/Press-test.internal.js | 2 +- .../__tests__/PressLegacy-test.internal.js | 2 +- .../src/dom/__tests__/Scroll-test.internal.js | 2 +- .../src/dom/__tests__/Tap-test.internal.js | 2 +- .../react-interactions/events/src/rn/Press.js | 540 ------------------ .../src/ReactFabricEventEmitter.js | 15 +- .../src/ReactFabricEventResponderSystem.js | 458 --------------- .../src/ReactFabricHostConfig.js | 41 +- .../src/ReactNativeHostConfig.js | 30 +- .../src/ReactNativeTypes.js | 45 -- .../src/createReactNoop.js | 4 +- .../src/ReactFiberCommitWork.js | 24 +- .../src/ReactFiberCompleteWork.js | 20 +- ...vents.js => ReactFiberDeprecatedEvents.js} | 16 +- .../react-reconciler/src/ReactFiberHooks.js | 16 +- .../src/__tests__/ReactScope-test.internal.js | 2 +- .../src/forks/ReactFiberHostConfig.custom.js | 6 +- .../src/ReactTestHostConfig.js | 10 +- packages/react/src/React.js | 8 +- packages/shared/ReactFeatureFlags.js | 2 +- .../forks/ReactFeatureFlags.native-fb.js | 2 +- .../forks/ReactFeatureFlags.native-oss.js | 2 +- .../forks/ReactFeatureFlags.persistent.js | 2 +- .../forks/ReactFeatureFlags.test-renderer.js | 2 +- .../ReactFeatureFlags.test-renderer.www.js | 2 +- .../shared/forks/ReactFeatureFlags.www.js | 2 +- 63 files changed, 215 insertions(+), 1304 deletions(-) rename packages/react-dom/src/events/{DOMEventResponderSystem.js => DeprecatedDOMEventResponderSystem.js} (97%) delete mode 100644 packages/react-interactions/events/src/rn/Press.js delete mode 100644 packages/react-native-renderer/src/ReactFabricEventResponderSystem.js rename packages/react-reconciler/src/{ReactFiberEvents.js => ReactFiberDeprecatedEvents.js} (93%) diff --git a/packages/legacy-events/ReactGenericBatching.js b/packages/legacy-events/ReactGenericBatching.js index 81441775a33cb..765e44d257cad 100644 --- a/packages/legacy-events/ReactGenericBatching.js +++ b/packages/legacy-events/ReactGenericBatching.js @@ -10,7 +10,7 @@ import { restoreStateIfNeeded, } from './ReactControlledComponent'; -import {enableFlareAPI} from 'shared/ReactFeatureFlags'; +import {enableDeprecatedFlareAPI} from 'shared/ReactFeatureFlags'; import {invokeGuardedCallbackAndCatchFirstError} from 'shared/ReactErrorUtils'; // Used as a way to call batchedUpdates when we don't have a reference to @@ -118,7 +118,7 @@ export function flushDiscreteUpdatesIfNeeded(timeStamp: number) { // behaviour as we had before this change, so the risks are low. if ( !isInsideEventHandler && - (!enableFlareAPI || + (!enableDeprecatedFlareAPI || (timeStamp === 0 || lastFlushedEventTimeStamp !== timeStamp)) ) { lastFlushedEventTimeStamp = timeStamp; diff --git a/packages/react-art/src/ReactARTHostConfig.js b/packages/react-art/src/ReactARTHostConfig.js index dbd86245516ab..62bdb3398664b 100644 --- a/packages/react-art/src/ReactARTHostConfig.js +++ b/packages/react-art/src/ReactARTHostConfig.js @@ -426,7 +426,7 @@ export function unhideTextInstance(textInstance, text): void { // Noop } -export function mountResponderInstance( +export function DEPRECATED_mountResponderInstance( responder: ReactEventResponder, responderInstance: ReactEventResponderInstance, props: Object, @@ -436,7 +436,7 @@ export function mountResponderInstance( throw new Error('Not yet implemented.'); } -export function unmountResponderInstance( +export function DEPRECATED_unmountResponderInstance( responderInstance: ReactEventResponderInstance, ): void { throw new Error('Not yet implemented.'); diff --git a/packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.internal.js b/packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.internal.js index d56ca36a02f4f..3e1c67087c12a 100644 --- a/packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.internal.js +++ b/packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.internal.js @@ -17,16 +17,16 @@ describe('ReactHooksInspection', () => { beforeEach(() => { jest.resetModules(); const ReactFeatureFlags = require('shared/ReactFeatureFlags'); - ReactFeatureFlags.enableFlareAPI = true; + ReactFeatureFlags.enableDeprecatedFlareAPI = true; React = require('react'); ReactDebugTools = require('react-debug-tools'); }); it('should inspect a simple useResponder hook', () => { - const TestResponder = React.unstable_createResponder('TestResponder', {}); + const TestResponder = React.DEPRECATED_createResponder('TestResponder', {}); function Foo(props) { - const listener = React.unstable_useResponder(TestResponder, { + const listener = React.DEPRECATED_useResponder(TestResponder, { preventDefault: false, }); return
Hello world
; diff --git a/packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js b/packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js index 7b123cf2f91d0..7a25979987b4f 100644 --- a/packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js +++ b/packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js @@ -76,7 +76,7 @@ describe('ReactDOMServerPartialHydration', () => { ReactFeatureFlags = require('shared/ReactFeatureFlags'); ReactFeatureFlags.enableSuspenseCallback = true; - ReactFeatureFlags.enableFlareAPI = true; + ReactFeatureFlags.enableDeprecatedFlareAPI = true; ReactFeatureFlags.debugRenderPhaseSideEffectsForStrictMode = false; React = require('react'); @@ -1885,13 +1885,16 @@ describe('ReactDOMServerPartialHydration', () => { } const onEvent = jest.fn(); - const TestResponder = React.unstable_createResponder('TestEventResponder', { - targetEventTypes: ['click'], - onEvent, - }); + const TestResponder = React.DEPRECATED_createResponder( + 'TestEventResponder', + { + targetEventTypes: ['click'], + onEvent, + }, + ); function Button() { - let listener = React.unstable_useResponder(TestResponder, {}); + let listener = React.DEPRECATED_useResponder(TestResponder, {}); return Click me; } @@ -2034,13 +2037,16 @@ describe('ReactDOMServerPartialHydration', () => { let promise = new Promise(resolvePromise => (resolve = resolvePromise)); const onEvent = jest.fn(); - const TestResponder = React.unstable_createResponder('TestEventResponder', { - targetEventTypes: ['click'], - onEvent, - }); + const TestResponder = React.DEPRECATED_createResponder( + 'TestEventResponder', + { + targetEventTypes: ['click'], + onEvent, + }, + ); function Button() { - let listener = React.unstable_useResponder(TestResponder, {}); + let listener = React.DEPRECATED_useResponder(TestResponder, {}); return Click me; } diff --git a/packages/react-dom/src/client/ReactDOMComponent.js b/packages/react-dom/src/client/ReactDOMComponent.js index 309ceb4514a37..670d5a70e6f38 100644 --- a/packages/react-dom/src/client/ReactDOMComponent.js +++ b/packages/react-dom/src/client/ReactDOMComponent.js @@ -12,7 +12,7 @@ import {getCurrentFiberOwnerNameInDevOrNull} from 'react-reconciler/src/ReactCur import {registrationNameModules} from 'legacy-events/EventPluginRegistry'; import {canUseDOM} from 'shared/ExecutionEnvironment'; import endsWith from 'shared/endsWith'; -import {setListenToResponderEventTypes} from '../events/DOMEventResponderSystem'; +import {setListenToResponderEventTypes} from '../events/DeprecatedDOMEventResponderSystem'; import { getValueForAttribute, @@ -88,7 +88,7 @@ import {validateProperties as validateUnknownProperties} from '../shared/ReactDO import {toStringOrTrustedType} from './ToStringValue'; import { - enableFlareAPI, + enableDeprecatedFlareAPI, enableTrustedTypesIntegration, } from 'shared/ReactFeatureFlags'; @@ -342,7 +342,7 @@ function setInitialDOMProperties( setTextContent(domElement, '' + nextProp); } } else if ( - (enableFlareAPI && propKey === DEPRECATED_flareListeners) || + (enableDeprecatedFlareAPI && propKey === DEPRECATED_flareListeners) || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING ) { @@ -709,7 +709,7 @@ export function diffProperties( } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) { // Noop. This is handled by the clear text mechanism. } else if ( - (enableFlareAPI && propKey === DEPRECATED_flareListeners) || + (enableDeprecatedFlareAPI && propKey === DEPRECATED_flareListeners) || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING ) { @@ -804,7 +804,7 @@ export function diffProperties( (updatePayload = updatePayload || []).push(propKey, '' + nextProp); } } else if ( - (enableFlareAPI && propKey === DEPRECATED_flareListeners) || + (enableDeprecatedFlareAPI && propKey === DEPRECATED_flareListeners) || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING ) { @@ -1058,7 +1058,7 @@ export function diffHydratedProperties( if (suppressHydrationWarning) { // Don't bother comparing. We're ignoring all these warnings. } else if ( - (enableFlareAPI && propKey === DEPRECATED_flareListeners) || + (enableDeprecatedFlareAPI && propKey === DEPRECATED_flareListeners) || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated @@ -1298,7 +1298,7 @@ export function listenToEventResponderEventTypes( eventTypes: Array, document: Document, ): void { - if (enableFlareAPI) { + if (enableDeprecatedFlareAPI) { // Get the listening Map for this element. We use this to track // what events we're listening to. const listenerMap = getListenerMapForElement(document); @@ -1346,6 +1346,6 @@ export function listenToEventResponderEventTypes( } // We can remove this once the event API is stable and out of a flag -if (enableFlareAPI) { +if (enableDeprecatedFlareAPI) { setListenToResponderEventTypes(listenToEventResponderEventTypes); } diff --git a/packages/react-dom/src/client/ReactDOMHostConfig.js b/packages/react-dom/src/client/ReactDOMHostConfig.js index 0298c2dfbf121..96498935a5a0d 100644 --- a/packages/react-dom/src/client/ReactDOMHostConfig.js +++ b/packages/react-dom/src/client/ReactDOMHostConfig.js @@ -54,8 +54,8 @@ import type { import { mountEventResponder, unmountEventResponder, - dispatchEventForResponderEventSystem, -} from '../events/DOMEventResponderSystem'; + DEPRECATED_dispatchEventForResponderEventSystem, +} from '../events/DeprecatedDOMEventResponderSystem'; import {retryIfBlockedOn} from '../events/ReactDOMEventReplaying'; export type Type = string; @@ -111,7 +111,7 @@ type SelectionInformation = {| import { enableSuspenseServerRenderer, - enableFlareAPI, + enableDeprecatedFlareAPI, enableFundamentalAPI, } from 'shared/ReactFeatureFlags'; import { @@ -212,7 +212,7 @@ export function resetAfterCommit(containerInfo: Container): void { restoreSelection(selectionInformation); ReactBrowserEventEmitterSetEnabled(eventsEnabled); eventsEnabled = null; - if (enableFlareAPI) { + if (enableDeprecatedFlareAPI) { const activeElementDetached = (selectionInformation: any) .activeElementDetached; if (activeElementDetached !== null) { @@ -468,7 +468,7 @@ function dispatchBeforeDetachedBlur(target: HTMLElement): void { const targetInstance = getClosestInstanceFromNode(target); ((selectionInformation: any): SelectionInformation).activeElementDetached = target; - dispatchEventForResponderEventSystem( + DEPRECATED_dispatchEventForResponderEventSystem( 'beforeblur', targetInstance, ({ @@ -481,7 +481,7 @@ function dispatchBeforeDetachedBlur(target: HTMLElement): void { } function dispatchDetachedBlur(target: HTMLElement): void { - dispatchEventForResponderEventSystem( + DEPRECATED_dispatchEventForResponderEventSystem( 'blur', null, ({ @@ -502,7 +502,7 @@ export function beforeRemoveInstance( instance: Instance | TextInstance | SuspenseInstance, ): void { if ( - enableFlareAPI && + enableDeprecatedFlareAPI && selectionInformation && instance === selectionInformation.focusedElem ) { @@ -944,7 +944,7 @@ export function didNotFindHydratableSuspenseInstance( } } -export function mountResponderInstance( +export function DEPRECATED_mountResponderInstance( responder: ReactDOMEventResponder, responderInstance: ReactDOMEventResponderInstance, responderProps: Object, @@ -966,10 +966,10 @@ export function mountResponderInstance( return responderInstance; } -export function unmountResponderInstance( +export function DEPRECATED_unmountResponderInstance( responderInstance: ReactDOMEventResponderInstance, ): void { - if (enableFlareAPI) { + if (enableDeprecatedFlareAPI) { // TODO stop listening to targetEventTypes unmountEventResponder(responderInstance); } diff --git a/packages/react-dom/src/events/DOMEventResponderSystem.js b/packages/react-dom/src/events/DeprecatedDOMEventResponderSystem.js similarity index 97% rename from packages/react-dom/src/events/DOMEventResponderSystem.js rename to packages/react-dom/src/events/DeprecatedDOMEventResponderSystem.js index fe5f91becebb9..14df089b916bd 100644 --- a/packages/react-dom/src/events/DOMEventResponderSystem.js +++ b/packages/react-dom/src/events/DeprecatedDOMEventResponderSystem.js @@ -29,7 +29,7 @@ import { } from 'legacy-events/ReactGenericBatching'; import {enqueueStateRestore} from 'legacy-events/ReactControlledComponent'; import type {Fiber} from 'react-reconciler/src/ReactFiber'; -import {enableFlareAPI} from 'shared/ReactFeatureFlags'; +import {enableDeprecatedFlareAPI} from 'shared/ReactFeatureFlags'; import invariant from 'shared/invariant'; import {getClosestInstanceFromNode} from '../client/ReactDOMComponentTree'; @@ -164,7 +164,7 @@ const eventResponderContext: ReactDOMResponderContext = { for (let i = 0; i < rootEventTypes.length; i++) { const rootEventType = rootEventTypes[i]; const eventResponderInstance = ((currentInstance: any): ReactDOMEventResponderInstance); - registerRootEventType(rootEventType, eventResponderInstance); + DEPRECATED_registerRootEventType(rootEventType, eventResponderInstance); } }, removeRootEventTypes(rootEventTypes: Array): void { @@ -494,14 +494,14 @@ function validateResponderContext(): void { ); } -export function dispatchEventForResponderEventSystem( +export function DEPRECATED_dispatchEventForResponderEventSystem( topLevelType: string, targetFiber: null | Fiber, nativeEvent: AnyNativeEvent, nativeEventTarget: Document | Element, eventSystemFlags: EventSystemFlags, ): void { - if (enableFlareAPI) { + if (enableDeprecatedFlareAPI) { const previousInstance = currentInstance; const previousTimeStamp = currentTimeStamp; const previousDocument = currentDocument; @@ -539,11 +539,11 @@ export function addRootEventTypesForResponderInstance( ): void { for (let i = 0; i < rootEventTypes.length; i++) { const rootEventType = rootEventTypes[i]; - registerRootEventType(rootEventType, responderInstance); + DEPRECATED_registerRootEventType(rootEventType, responderInstance); } } -function registerRootEventType( +function DEPRECATED_registerRootEventType( rootEventType: string, eventResponderInstance: ReactDOMEventResponderInstance, ): void { diff --git a/packages/react-dom/src/events/ReactDOMEventListener.js b/packages/react-dom/src/events/ReactDOMEventListener.js index bb7450c45a5e1..1bc5373e83350 100644 --- a/packages/react-dom/src/events/ReactDOMEventListener.js +++ b/packages/react-dom/src/events/ReactDOMEventListener.js @@ -23,7 +23,7 @@ import { flushDiscreteUpdatesIfNeeded, } from 'legacy-events/ReactGenericBatching'; import {runExtractedPluginEventsInBatch} from 'legacy-events/EventPluginHub'; -import {dispatchEventForResponderEventSystem} from './DOMEventResponderSystem'; +import {DEPRECATED_dispatchEventForResponderEventSystem} from './DeprecatedDOMEventResponderSystem'; import { isReplayableDiscreteEvent, queueDiscreteEvent, @@ -63,7 +63,7 @@ import SimpleEventPlugin from './SimpleEventPlugin'; import {getRawEventName} from './DOMTopLevelEventTypes'; import {passiveBrowserEventsSupported} from './checkPassiveEvents'; -import {enableFlareAPI} from 'shared/ReactFeatureFlags'; +import {enableDeprecatedFlareAPI} from 'shared/ReactFeatureFlags'; import { UserBlockingEvent, ContinuousEvent, @@ -403,7 +403,7 @@ export function dispatchEvent( // This is not replayable so we'll invoke it but without a target, // in case the event system needs to trace it. - if (enableFlareAPI) { + if (enableDeprecatedFlareAPI) { if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { dispatchEventForPluginEventSystem( topLevelType, @@ -414,7 +414,7 @@ export function dispatchEvent( } if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { // React Flare event system - dispatchEventForResponderEventSystem( + DEPRECATED_dispatchEventForResponderEventSystem( (topLevelType: any), null, nativeEvent, @@ -481,7 +481,7 @@ export function attemptToDispatchEvent( } } - if (enableFlareAPI) { + if (enableDeprecatedFlareAPI) { if (eventSystemFlags & PLUGIN_EVENT_SYSTEM) { dispatchEventForPluginEventSystem( topLevelType, @@ -492,7 +492,7 @@ export function attemptToDispatchEvent( } if (eventSystemFlags & RESPONDER_EVENT_SYSTEM) { // React Flare event system - dispatchEventForResponderEventSystem( + DEPRECATED_dispatchEventForResponderEventSystem( (topLevelType: any), targetInst, nativeEvent, diff --git a/packages/react-dom/src/events/ReactDOMEventReplaying.js b/packages/react-dom/src/events/ReactDOMEventReplaying.js index 38d208333e230..4f94f903ea875 100644 --- a/packages/react-dom/src/events/ReactDOMEventReplaying.js +++ b/packages/react-dom/src/events/ReactDOMEventReplaying.js @@ -14,7 +14,7 @@ import type {EventSystemFlags} from 'legacy-events/EventSystemFlags'; import type {FiberRoot} from 'react-reconciler/src/ReactFiberRoot'; import { - enableFlareAPI, + enableDeprecatedFlareAPI, enableSelectiveHydration, } from 'shared/ReactFeatureFlags'; import { @@ -217,7 +217,7 @@ function trapReplayableEvent( listenerMap: Map void)>, ) { listenToTopLevel(topLevelType, document, listenerMap); - if (enableFlareAPI) { + if (enableDeprecatedFlareAPI) { // Trap events for the responder system. const topLevelTypeString = unsafeCastDOMTopLevelTypeToString(topLevelType); const passiveEventKey = topLevelTypeString + '_passive'; diff --git a/packages/react-dom/src/events/__tests__/DOMEventResponderSystem-test.internal.js b/packages/react-dom/src/events/__tests__/DOMEventResponderSystem-test.internal.js index 896fca06f8d97..fa6b895561c5a 100644 --- a/packages/react-dom/src/events/__tests__/DOMEventResponderSystem-test.internal.js +++ b/packages/react-dom/src/events/__tests__/DOMEventResponderSystem-test.internal.js @@ -29,7 +29,7 @@ function createEventResponder({ getInitialState, targetPortalPropagation, }) { - return React.unstable_createResponder('TestEventResponder', { + return React.DEPRECATED_createResponder('TestEventResponder', { targetEventTypes, onEvent, onRootEvent, @@ -69,7 +69,7 @@ describe('DOMEventResponderSystem', () => { beforeEach(() => { jest.resetModules(); ReactFeatureFlags = require('shared/ReactFeatureFlags'); - ReactFeatureFlags.enableFlareAPI = true; + ReactFeatureFlags.enableDeprecatedFlareAPI = true; ReactFeatureFlags.enableScopeAPI = true; React = require('react'); ReactDOM = require('react-dom'); @@ -87,13 +87,13 @@ describe('DOMEventResponderSystem', () => { it('can mount and render correctly with the ReactTestRenderer', () => { jest.resetModules(); ReactFeatureFlags = require('shared/ReactFeatureFlags'); - ReactFeatureFlags.enableFlareAPI = true; + ReactFeatureFlags.enableDeprecatedFlareAPI = true; React = require('react'); ReactTestRenderer = require('react-test-renderer'); const TestResponder = createEventResponder({}); function Test() { - const listener = React.unstable_useResponder(TestResponder, {}); + const listener = React.DEPRECATED_useResponder(TestResponder, {}); return
Hello world
; } @@ -105,7 +105,7 @@ describe('DOMEventResponderSystem', () => { const TestResponder = createEventResponder({}); function Test() { - const listener = React.unstable_useResponder(TestResponder, {}); + const listener = React.DEPRECATED_useResponder(TestResponder, {}); return
Hello world
; } @@ -122,7 +122,7 @@ describe('DOMEventResponderSystem', () => { const ref = React.createRef(); function Test() { - const listener = React.unstable_useResponder(TestResponder, {}); + const listener = React.DEPRECATED_useResponder(TestResponder, {}); return (
@@ -160,7 +160,7 @@ describe('DOMEventResponderSystem', () => { }); function Test() { - const listener = React.unstable_useResponder(TestResponder, {}); + const listener = React.DEPRECATED_useResponder(TestResponder, {}); return (