);
@@ -859,13 +859,13 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Inner = () => {
const listener = usePress({onPressChange});
- return
;
};
const Outer = () => {
const listener = usePress({onPressChange});
return (
-
+
);
@@ -889,7 +889,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPress});
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -909,7 +909,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPress});
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -931,7 +931,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const listener = usePress({onPress});
return (
-
+
);
};
@@ -951,7 +951,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPress});
return (
-
+
);
@@ -974,7 +974,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPress});
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -996,7 +996,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPress, preventDefault: false});
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -1016,7 +1016,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPress, preventDefault: false});
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -1038,7 +1038,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPressEnd});
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -1055,7 +1055,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPressEnd});
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -1075,7 +1075,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const listener = usePress({onPressEnd});
return (
);
};
@@ -1097,7 +1097,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const listener = usePress({onPressEnd});
return (
);
@@ -1120,7 +1120,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress();
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -1140,7 +1140,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const Component = () => {
const listener = usePress({onPress, onPressStart, onPressEnd});
- return
;
+ return
;
};
ReactDOM.render(
, container);
diff --git a/packages/react-interactions/events/src/dom/__tests__/Scroll-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Scroll-test.internal.js
index daff0d382be15..c88be66ae3e2c 100644
--- a/packages/react-interactions/events/src/dom/__tests__/Scroll-test.internal.js
+++ b/packages/react-interactions/events/src/dom/__tests__/Scroll-test.internal.js
@@ -55,7 +55,7 @@ describe.each(table)('Scroll responder', hasPointerEvents => {
disabled: true,
onScroll,
});
- return
;
+ return
;
};
ReactDOM.render(
, container);
});
@@ -77,7 +77,7 @@ describe.each(table)('Scroll responder', hasPointerEvents => {
const listener = useScroll({
onScroll,
});
- return
;
+ return
;
};
ReactDOM.render(
, container);
});
@@ -148,7 +148,7 @@ describe.each(table)('Scroll responder', hasPointerEvents => {
const listener = useScroll({
onScrollDragStart,
});
- return
;
+ return
;
};
ReactDOM.render(
, container);
});
@@ -178,7 +178,7 @@ describe.each(table)('Scroll responder', hasPointerEvents => {
const listener = useScroll({
onScrollDragEnd,
});
- return
;
+ return
;
};
ReactDOM.render(
, container);
});
diff --git a/packages/react-interactions/events/src/dom/__tests__/Tap-test.internal.js b/packages/react-interactions/events/src/dom/__tests__/Tap-test.internal.js
index 9c7d828915946..1fb27aedc732a 100644
--- a/packages/react-interactions/events/src/dom/__tests__/Tap-test.internal.js
+++ b/packages/react-interactions/events/src/dom/__tests__/Tap-test.internal.js
@@ -87,7 +87,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
const ref = React.createRef();
const Component = () => {
const listener = useTap();
- return
;
+ return
;
};
ReactDOM.render(
, container);
@@ -122,7 +122,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
onTapCancel,
onTapEnd,
});
- return
;
+ return
;
};
ReactDOM.render(
, container);
});
@@ -145,7 +145,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
function render(props) {
const Component = () => {
const listener = useTap(props);
- return
;
+ return
;
};
ReactDOM.render(
, container);
document.elementFromPoint = () => ref.current;
@@ -201,7 +201,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
ref = React.createRef();
const Component = () => {
const listener = useTap({onAuxiliaryTap});
- return
;
+ return
;
};
ReactDOM.render(
, container);
document.elementFromPoint = () => ref.current;
@@ -234,7 +234,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
ref = React.createRef();
const Component = () => {
const listener = useTap({onTapStart});
- return
;
+ return
;
};
ReactDOM.render(
, container);
document.elementFromPoint = () => ref.current;
@@ -338,7 +338,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
ref = React.createRef();
const Component = () => {
const listener = useTap({onTapEnd});
- return
;
+ return
;
};
ReactDOM.render(
, container);
document.elementFromPoint = () => ref.current;
@@ -391,7 +391,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
const Component = () => {
const listener = useTap({onTapEnd});
return (
-
+
);
@@ -480,7 +480,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
ref = React.createRef();
const Component = () => {
const listener = useTap({onTapUpdate});
- return
;
+ return
;
};
ReactDOM.render(
, container);
document.elementFromPoint = () => ref.current;
@@ -592,7 +592,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
onTapEnd: logger('end'),
onTapCancel: logger('cancel'),
});
- return
;
+ return
;
};
ReactDOM.render(
, container);
document.elementFromPoint = () => ref.current;
@@ -646,7 +646,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
const listener = useTap({onTapCancel, onTapUpdate});
return (
);
@@ -800,7 +800,7 @@ describeWithPointerEvent('Tap responder', hasPointerEvents => {
preventDefault: shouldPreventDefault,
});
return (
-
+
);
diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.js b/packages/react-reconciler/src/ReactFiberCommitWork.js
index 88a42db93dcaa..f365fb70ba685 100644
--- a/packages/react-reconciler/src/ReactFiberCommitWork.js
+++ b/packages/react-reconciler/src/ReactFiberCommitWork.js
@@ -124,7 +124,7 @@ import {
} from './ReactHookEffectTags';
import {didWarnAboutReassigningProps} from './ReactFiberBeginWork';
import {runWithPriority, NormalPriority} from './SchedulerWithReactIntegration';
-import {updateEventListeners} from './ReactFiberEvents';
+import {updateLegacyEventListeners} from './ReactFiberEvents';
let didWarnAboutUndefinedSnapshotBeforeUpdate: Set
| null = null;
if (__DEV__) {
@@ -1361,10 +1361,10 @@ function commitWork(current: Fiber | null, finishedWork: Fiber): void {
);
}
if (enableFlareAPI) {
- const prevListeners = oldProps.listeners;
- const nextListeners = newProps.listeners;
+ const prevListeners = oldProps.DEPRECATED_flareListeners;
+ const nextListeners = newProps.DEPRECATED_flareListeners;
if (prevListeners !== nextListeners) {
- updateEventListeners(nextListeners, finishedWork, null);
+ updateLegacyEventListeners(nextListeners, finishedWork, null);
}
}
}
@@ -1426,10 +1426,10 @@ function commitWork(current: Fiber | null, finishedWork: Fiber): void {
if (enableFlareAPI) {
const newProps = finishedWork.memoizedProps;
const oldProps = current !== null ? current.memoizedProps : newProps;
- const prevListeners = oldProps.listeners;
- const nextListeners = newProps.listeners;
+ const prevListeners = oldProps.DEPRECATED_flareListeners;
+ const nextListeners = newProps.DEPRECATED_flareListeners;
if (prevListeners !== nextListeners) {
- updateEventListeners(nextListeners, finishedWork, null);
+ updateLegacyEventListeners(nextListeners, finishedWork, null);
}
}
}
diff --git a/packages/react-reconciler/src/ReactFiberCompleteWork.js b/packages/react-reconciler/src/ReactFiberCompleteWork.js
index a8ea88728e21f..8f002d9f1cfaa 100644
--- a/packages/react-reconciler/src/ReactFiberCompleteWork.js
+++ b/packages/react-reconciler/src/ReactFiberCompleteWork.js
@@ -128,7 +128,7 @@ import {
import {createFundamentalStateInstance} from './ReactFiberFundamental';
import {Never} from './ReactFiberExpirationTime';
import {resetChildFibers} from './ReactChildFiber';
-import {updateEventListeners} from './ReactFiberEvents';
+import {updateLegacyEventListeners} from './ReactFiberEvents';
import {createScopeMethods} from './ReactFiberScope';
function markUpdate(workInProgress: Fiber) {
@@ -686,8 +686,8 @@ function completeWork(
);
if (enableFlareAPI) {
- const prevListeners = current.memoizedProps.listeners;
- const nextListeners = newProps.listeners;
+ const prevListeners = current.memoizedProps.DEPRECATED_flareListeners;
+ const nextListeners = newProps.DEPRECATED_flareListeners;
if (prevListeners !== nextListeners) {
markUpdate(workInProgress);
}
@@ -728,9 +728,9 @@ function completeWork(
markUpdate(workInProgress);
}
if (enableFlareAPI) {
- const listeners = newProps.listeners;
+ const listeners = newProps.DEPRECATED_flareListeners;
if (listeners != null) {
- updateEventListeners(
+ updateLegacyEventListeners(
listeners,
workInProgress,
rootContainerInstance,
@@ -752,9 +752,9 @@ function completeWork(
workInProgress.stateNode = instance;
if (enableFlareAPI) {
- const listeners = newProps.listeners;
+ const listeners = newProps.DEPRECATED_flareListeners;
if (listeners != null) {
- updateEventListeners(
+ updateLegacyEventListeners(
listeners,
workInProgress,
rootContainerInstance,
@@ -1252,10 +1252,10 @@ function completeWork(
workInProgress.stateNode = scopeInstance;
scopeInstance.methods = createScopeMethods(type, scopeInstance);
if (enableFlareAPI) {
- const listeners = newProps.listeners;
+ const listeners = newProps.DEPRECATED_flareListeners;
if (listeners != null) {
const rootContainerInstance = getRootHostContainer();
- updateEventListeners(
+ updateLegacyEventListeners(
listeners,
workInProgress,
rootContainerInstance,
@@ -1268,8 +1268,9 @@ function completeWork(
}
} else {
if (enableFlareAPI) {
- const prevListeners = current.memoizedProps.listeners;
- const nextListeners = newProps.listeners;
+ const prevListeners =
+ current.memoizedProps.DEPRECATED_flareListeners;
+ const nextListeners = newProps.DEPRECATED_flareListeners;
if (
prevListeners !== nextListeners ||
workInProgress.ref !== null
diff --git a/packages/react-reconciler/src/ReactFiberEvents.js b/packages/react-reconciler/src/ReactFiberEvents.js
index af3b23b11a9b0..54f54ff02803c 100644
--- a/packages/react-reconciler/src/ReactFiberEvents.js
+++ b/packages/react-reconciler/src/ReactFiberEvents.js
@@ -146,7 +146,7 @@ function updateEventListener(
}
}
-export function updateEventListeners(
+export function updateLegacyEventListeners(
listeners: any,
fiber: Fiber,
rootContainerInstance: null | Container,
diff --git a/packages/react-reconciler/src/__tests__/ReactScope-test.internal.js b/packages/react-reconciler/src/__tests__/ReactScope-test.internal.js
index e1cff6dc248f8..92ae0b829c1c6 100644
--- a/packages/react-reconciler/src/__tests__/ReactScope-test.internal.js
+++ b/packages/react-reconciler/src/__tests__/ReactScope-test.internal.js
@@ -343,7 +343,7 @@ describe('ReactScope', () => {
onKeyDown,
});
return (
-
+
);
@@ -361,7 +361,7 @@ describe('ReactScope', () => {
});
return (
diff --git a/packages/react-test-renderer/src/ReactTestHostConfig.js b/packages/react-test-renderer/src/ReactTestHostConfig.js
index 52848ad3aba2a..a3b8bff0f1339 100644
--- a/packages/react-test-renderer/src/ReactTestHostConfig.js
+++ b/packages/react-test-renderer/src/ReactTestHostConfig.js
@@ -149,11 +149,11 @@ export function createInstance(
): Instance {
let propsToUse = props;
if (enableFlareAPI) {
- if (props.listeners != null) {
- // We want to remove the "listeners" prop
+ if (props.DEPRECATED_flareListeners != null) {
+ // We want to remove the "DEPRECATED_flareListeners" prop
// as we don't want it in the test renderer's
// instance props.
- const {listeners, ...otherProps} = props; // eslint-disable-line
+ const {DEPRECATED_flareListeners, ...otherProps} = props; // eslint-disable-line
propsToUse = otherProps;
}
}