Skip to content

Commit a58babb

Browse files
committed
Review suggestions #1
1 parent ef9235b commit a58babb

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

packages/docs-gesture-handler/docs/fundamentals/gesture-detector.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ sidebar_position: 3
77

88
## Gesture Detector
99

10-
`GestureDetector` is the core component of RNGH3. Unlike in previous version, it no longer manages the lifecycle of gestures directly. It supports recognizing multiple gestures through [gesture composition](/docs/fundamentals/gesture-composition).
10+
The `GestureDetector` is a key component of RNGH3. It supports gestures created either using the hooks API or the builder pattern. Additionally, it allows for the recognition of multiple gestures through [gesture composition](/docs/fundamentals/gesture-composition).
1111

12-
To facilitate a smooth migration, the gesture property accepts both gestures created using the hooks API and gestures created using the builder pattern.
13-
14-
When using RNGH3 gestures, you can also integrate them directly with the [Animated API](https://reactnative.dev/docs/animated).
12+
When using hook API, you can also integrate it directly with the [Animated API](https://reactnative.dev/docs/animated).
1513

1614
### Example
1715

@@ -21,7 +19,11 @@ When using RNGH3 gestures, you can also integrate them directly with the [Animat
2119
import { GestureDetector, useTapGesture } from 'react-native-gesture-handler';
2220

2321
export default function App() {
24-
const tap = useTapGesture({});
22+
const tap = useTapGesture({
23+
onDeactivate: () => {
24+
console.log('Tap!');
25+
},
26+
});
2527

2628
return (
2729
<GestureHandlerRootView>
@@ -82,15 +84,15 @@ export default function App() {
8284

8385
## Virtual Detectors
8486

85-
In RNGH3, `GestureDetector` is a standalone native component. Depending on your view hierarchy, this can occasionally disrupt interactions between specific components. To resolve this, use `InterceptingGestureDetector` in combination with `VirtualNativeDetector`.
87+
In RNGH3, `GestureDetector` is a standalone host component. Depending on your view hierarchy, this can occasionally disrupt interactions between specific components. To resolve this, use `InterceptingGestureDetector` in combination with `VirtualNativeDetector`.
8688

8789
### InterceptingGestureDetector
8890

8991
`InterceptingGestureDetector` functions similarly to a standard `GestureDetector`, but it can also act as a proxy for `VirtualGestureDetector` within its component subtree. Because it can be used solely to establish the context for virtual detectors, the [`gesture`](#gesture) property is optional.
9092

9193
### VirtualGestureDetector
9294

93-
`VirtualGestureDetector` is similar to the `GestureDetector` from RNGH2. Because it is not a native component, it does not interfere with the native view hierarchy. This allows you to attach gestures without disrupting functionality that depends on that hierarchy.
95+
`VirtualGestureDetector` is similar to the `GestureDetector` from RNGH2. Because it is not a host component, it does not interfere with the host view hierarchy. This allows you to attach gestures without disrupting functionality that depends on it.
9496

9597
### Example
9698

0 commit comments

Comments
 (0)