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: docs/docs/gestures/native-gesture.md
+48-7Lines changed: 48 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,36 +10,77 @@ import BaseEventConfig from './\_shared/base-gesture-config.md';
10
10
import BaseEventCallbacks from './\_shared/base-gesture-callbacks.md';
11
11
import BaseContinuousEventCallbacks from './\_shared/base-continuous-gesture-callbacks.md';
12
12
13
-
A gesture that allows other touch handling components to participate in RNGH's gesture system. When used, the other component should be the direct child of a `GestureDetector`.
13
+
A gesture that allows other touch handling components to work within RNGH's gesture system. This streamlines interactions between gestures and the native component, allowing it to form [relations](/docs/fundamentals/gesture-composition) with other gestures.
14
14
15
-
## Reference
15
+
When used, the native component should be the direct child of a `GestureDetector`.
16
+
17
+
## Example
18
+
19
+
This example renders a `ScrollView` with multiple colored rectangles, where each rectangle has a black section. Starting a touch on a black section will disable the `ScrollView` for the duration of the `Pan` gesture.
-`Native` gesture can be used as part of [gesture composition and cross-component interactions](/docs/fundamentals/gesture-composition) just like any other gesture. You can use this to block a native component for the duration of the gesture or to make it work alongside a gesture.
68
+
69
+
:::danger
70
+
Do not use `Native` gesture with components exported by React Native Gesture Handler. Those come with a native gesture handler preapplied. Attaching a native gesture twice will likely result in the components not working as intended.
When `true`, underlying handler will activate unconditionally when in `BEGAN` or `UNDETERMINED` state.
79
+
When `true`, underlying handler will activate unconditionally when it receives any touches in [`BEGAN`](/docs/fundamentals/states-events#began) or [`UNDETERMINED`](/docs/fundamentals/states-events#undetermined) state.
39
80
40
81
### `disallowInterruption(value: boolean)`
41
82
42
-
When `true`, cancels all other gesture handlers when this `NativeViewGestureHandler`receives an `ACTIVE` state event.
83
+
When `true`, cancels all other gesture handlers when this `NativeViewGestureHandler`changes its state to [`ACTIVE`](/docs/fundamentals/states-events#active).
0 commit comments