You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs-gesture-handler/docs/components/touchables.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ sidebar_label: Touchables
5
5
---
6
6
7
7
:::warning
8
-
Touchables will be removed in the future version of Gesture Handler. Use Pressable instead.
8
+
Touchables will be removed in the future version of Gesture Handler. Use [`Pressable`](/docs/components/pressable) instead.
9
9
:::
10
10
11
11
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.
@@ -28,12 +28,12 @@ Our intention was to make switch for these touchables as simple as possible. In
28
28
need only to change imports of touchables.
29
29
30
30
:::info
31
-
Gesture Handler's TouchableOpacity uses native driver for animations by default. If this causes problems for you, you can set `useNativeAnimations` prop to false.
31
+
Gesture Handler's `TouchableOpacity` uses native driver for animations by default. If this causes problems for you, you can set `useNativeAnimations` prop to false.
32
32
:::
33
33
34
34
### Example:
35
35
36
-
```javascript
36
+
```ts
37
37
import {
38
38
TouchableNativeFeedback,
39
39
TouchableHighlight,
@@ -44,7 +44,7 @@ import {
44
44
45
45
has to be replaced with:
46
46
47
-
```javascript
47
+
```ts
48
48
import {
49
49
TouchableNativeFeedback,
50
50
TouchableHighlight,
@@ -53,4 +53,4 @@ import {
53
53
} from'react-native-gesture-handler';
54
54
```
55
55
56
-
For a comparison of both touchable implementations see our [touchables example](https://github.com/software-mansion/react-native-gesture-handler/blob/main/apps/common-app/src/release_tests/touchables/index.tsx)
56
+
For a comparison of both touchable implementations see our [touchables example](https://github.com/software-mansion/react-native-gesture-handler/blob/main/apps/common-app/src/legacy/release_tests/touchables/index.tsx)
0 commit comments