Skip to content

Commit 1f9f20b

Browse files
authored
chore(docs): add actionable advice to deprecation warnings (#3387)
## Description Add actionable advice to deprecation warnings. See: #3260 ## Test plan - None needed
1 parent 07af72a commit 1f9f20b

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

docs/docs/components/touchables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_label: Touchables
55
---
66

77
:::warning
8-
Touchables will be removed in the future version of Gesture Handler.
8+
Touchables will be removed in the future version of Gesture Handler. Use Pressable instead.
99
:::
1010

1111
Gesture Handler library provides an implementation of RN's touchable components that are based on [native buttons](buttons.mdx) and does not rely on JS responder system utilized by RN. Our touchable implementation follows the same API and aims to be a drop-in replacement for touchables available in React Native.

src/components/touchables/TouchableHighlight.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ interface State {
2020
}
2121

2222
/**
23-
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler.
23+
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler. Use Pressable instead.
2424
*/
2525
export type TouchableHighlightProps = RNTouchableHighlightProps &
2626
GenericTouchableProps;
2727

2828
/**
29-
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler.
29+
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler. Use Pressable instead.
3030
*
3131
* TouchableHighlight follows RN's implementation
3232
*/

src/components/touchables/TouchableNativeFeedback.android.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from './TouchableNativeFeedbackProps';
99

1010
/**
11-
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
11+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
1212
*
1313
* TouchableNativeFeedback behaves slightly different than RN's TouchableNativeFeedback.
1414
* There's small difference with handling long press ripple since RN's implementation calls

src/components/touchables/TouchableNativeFeedback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { TouchableNativeFeedback as RNTouchableNativeFeedback } from 'react-native';
22

33
/**
4-
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
4+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
55
*/
66
const TouchableNativeFeedback = RNTouchableNativeFeedback;
77

src/components/touchables/TouchableNativeFeedbackProps.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type TouchableNativeFeedbackExtraProps = {
99
};
1010

1111
/**
12-
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
12+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
1313
*/
1414
export type TouchableNativeFeedbackProps = RNTouchableNativeFeedbackProps &
1515
GenericTouchableProps;

src/components/touchables/TouchableOpacity.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import * as React from 'react';
1111
import { Component } from 'react';
1212

1313
/**
14-
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler.
14+
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler. Use Pressable instead.
1515
*/
1616
export type TouchableOpacityProps = RNTouchableOpacityProps &
1717
GenericTouchableProps & {
1818
useNativeAnimations?: boolean;
1919
};
2020

2121
/**
22-
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler.
22+
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler. Use Pressable instead.
2323
*
2424
* TouchableOpacity bases on timing animation which has been used in RN's core
2525
*/

src/components/touchables/TouchableWithoutFeedback.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import GenericTouchable from './GenericTouchable';
44
import type { GenericTouchableProps } from './GenericTouchableProps';
55

66
/**
7-
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler.
7+
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
88
*/
99
export type TouchableWithoutFeedbackProps = GenericTouchableProps;
1010

1111
/**
12-
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler.
12+
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
1313
*/
1414
const TouchableWithoutFeedback = React.forwardRef<
1515
GenericTouchable,

0 commit comments

Comments
 (0)