Skip to content

Commit bf76e72

Browse files
authored
[General] Rename useMultipleGestures to useCompetingGestures (#3848)
## Description Following the internal discussion, renames `useMultipleGestures` to `useCompetingGestures`. ## Test plan Static checks
1 parent 1fbdbcc commit bf76e72

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/react-native-gesture-handler/src/__tests__/RelationsTraversal.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { tagMessage } from '../utils';
22
import {
33
useExclusiveGestures,
4-
useMultipleGestures,
4+
useCompetingGestures,
55
useSimultaneousGestures,
66
} from '../v3/hooks/composition';
77
import { useGesture } from '../v3/hooks/useGesture';
@@ -39,7 +39,7 @@ describe('Ensure only one leaf node', () => {
3939
});
4040

4141
test('useRace', () => {
42-
expect(() => useMultipleGestures(pan1, pan1)).toThrow(errorMessage);
42+
expect(() => useCompetingGestures(pan1, pan1)).toThrow(errorMessage);
4343
});
4444

4545
test('Complex composition', () => {
@@ -93,7 +93,7 @@ describe('Simple relations', () => {
9393
});
9494

9595
test('useRace', () => {
96-
const composedGesture = renderHook(() => useMultipleGestures(pan1, pan2))
96+
const composedGesture = renderHook(() => useCompetingGestures(pan1, pan2))
9797
.result.current;
9898

9999
configureRelations(composedGesture);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { useSimultaneousGestures } from './useSimultaneousGestures';
22
export { useExclusiveGestures } from './useExclusiveGestures';
3-
export { useMultipleGestures } from './useMultipleGestures';
3+
export { useCompetingGestures } from './useCompetingGestures';
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AnyGesture, ComposedGestureName } from '../../types';
22
import { useComposedGesture } from './useComposedGesture';
33

4-
export function useMultipleGestures(...gestures: AnyGesture[]) {
4+
export function useCompetingGestures(...gestures: AnyGesture[]) {
55
return useComposedGesture(ComposedGestureName.Race, ...gestures);
66
}

0 commit comments

Comments
 (0)