Skip to content

Commit 2cee2c4

Browse files
committed
Touchable replacement note
1 parent 5007490 commit 2cee2c4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/docs-gesture-handler/docs/components/touchable.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ Replacing `BorderlessButton` with `Touchable` is as easy as replacing `RectButto
4040
activeOpacity={0.3}/>
4141
```
4242

43-
## Replacing deprecated Touchables
43+
## Migrating from legacy Touchable variants
4444

45-
If you were using the deprecated [`Touchables`](/docs/components/legacy-touchables), you can replace them with new `Touchable` as well.
45+
If you were using the specialized touchable components (`TouchableOpacity`, `TouchableHighlight`, `TouchableWithoutFeedback`, or `TouchableNativeFeedback`), you can replicate their behavior with the unified `Touchable` component.
4646

4747
### TouchableOpacity
4848

49-
To replace `TouchableOpacity` with `Touchable`, add `activeOpacity={0.2}`.
49+
To replace `TouchableOpacity`, add `activeOpacity={0.2}`.
5050

5151
```tsx
5252
<Touchable
@@ -56,7 +56,7 @@ To replace `TouchableOpacity` with `Touchable`, add `activeOpacity={0.2}`.
5656

5757
### TouchableHighlight
5858

59-
To replace `TouchableHighlight` with `Touchable`, add `activeUnderlayOpacity={1}`.
59+
To replace `TouchableHighlight`, add `activeUnderlayOpacity={1}`.
6060

6161
```tsx
6262
<Touchable
@@ -74,7 +74,7 @@ To replace `TouchableWithoutFeedback`, use a plain `Touchable`.
7474

7575
### TouchableNativeFeedback
7676

77-
To replace `TouchableNativeFeedback`, use the [`androidRipple`](#androidripple) prop. Make sure to set `foreground={true}`.
77+
To replicate `TouchableNativeFeedback` behavior, use the [`androidRipple`](#androidripple) prop. Make sure to set `foreground={true}`.
7878

7979
```tsx
8080
<Touchable

0 commit comments

Comments
 (0)