@@ -1069,7 +1069,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const outsideRef = React.createRef();
const Component = () => {
- const listener = usePressResponder({onPressEnd});
+ const listener = usePress({onPressEnd});
return (
@@ -1094,7 +1094,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const ref = React.createRef();
const Component = () => {
- const listener = usePressResponder();
+ const listener = usePress();
return
;
};
ReactDOM.render(
, container);
@@ -1128,7 +1128,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
};
const Component = () => {
- const listener = usePressResponder({
+ const listener = usePress({
onPressStart: logEvent,
onPressEnd: logEvent,
onPressMove: logEvent,
@@ -1248,7 +1248,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
updateCounter(count => count + 1);
}
- const listener = usePressResponder({
+ const listener = usePress({
onPress: handlePress,
});
@@ -1316,7 +1316,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
updateCounter(count => count + 1);
}
- const listener = usePressResponder({
+ const listener = usePress({
onPress: handlePress,
});
@@ -1398,7 +1398,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
updatePressesCount(pressesCount + 1);
}
- const listener = usePressResponder({
+ const listener = usePress({
onPress: handlePress,
});
@@ -1439,7 +1439,7 @@ describe.each(environmentTable)('Press responder', hasPointerEvents => {
const pointerDownEvent = jest.fn();
const Component = () => {
- const listener = usePressResponder({stopPropagation: true});
+ const listener = usePress({stopPropagation: true});
return
;
};
diff --git a/packages/react-events/src/dom/__tests__/Scroll-test.internal.js b/packages/react-events/src/dom/__tests__/Scroll-test.internal.js
index 3c61944e7c5ee..3af960e55a389 100644
--- a/packages/react-events/src/dom/__tests__/Scroll-test.internal.js
+++ b/packages/react-events/src/dom/__tests__/Scroll-test.internal.js
@@ -14,7 +14,7 @@ import {createEventTarget, setPointerEvent} from '../testing-library';
let React;
let ReactFeatureFlags;
let ReactDOM;
-let useScrollResponder;
+let useScroll;
const forcePointerEvents = true;
const table = [[forcePointerEvents], [!forcePointerEvents]];
@@ -26,7 +26,7 @@ const initializeModules = hasPointerEvents => {
ReactFeatureFlags.enableFlareAPI = true;
React = require('react');
ReactDOM = require('react-dom');
- useScrollResponder = require('react-events/scroll').useScrollResponder;
+ useScroll = require('react-events/scroll').useScroll;
};
describe.each(table)('Scroll responder', hasPointerEvents => {
@@ -51,7 +51,7 @@ describe.each(table)('Scroll responder', hasPointerEvents => {
onScroll = jest.fn();
ref = React.createRef();
const Component = () => {
- const listener = useScrollResponder({
+ const listener = useScroll({
disabled: true,
onScroll,
});
@@ -74,7 +74,7 @@ describe.each(table)('Scroll responder', hasPointerEvents => {
onScroll = jest.fn();
ref = React.createRef();
const Component = () => {
- const listener = useScrollResponder({
+ const listener = useScroll({
onScroll,
});
return
;
@@ -145,7 +145,7 @@ describe.each(table)('Scroll responder', hasPointerEvents => {
onScrollDragStart = jest.fn();
ref = React.createRef();
const Component = () => {
- const listener = useScrollResponder({
+ const listener = useScroll({
onScrollDragStart,
});
return
;
@@ -175,7 +175,7 @@ describe.each(table)('Scroll responder', hasPointerEvents => {
onScrollDragEnd = jest.fn();
ref = React.createRef();
const Component = () => {
- const listener = useScrollResponder({
+ const listener = useScroll({
onScrollDragEnd,
});
return
;
diff --git a/packages/react-events/src/rn/Press.js b/packages/react-events/src/rn/Press.js
index d2d774b3ba72c..fac15a59d2ffb 100644
--- a/packages/react-events/src/rn/Press.js
+++ b/packages/react-events/src/rn/Press.js
@@ -533,7 +533,7 @@ export const PressResponder = React.unstable_createResponder(
pressResponderImpl,
);
-export function usePressResponder(
+export function usePress(
props: PressProps,
): ReactEventResponderListener
{
return React.unstable_useResponder(PressResponder, props);