react-native-gesture-handler
Version:
Declarative API exposing native platform touch and gesture system to React Native
25 lines (22 loc) • 919 B
text/typescript
import type { SharedValue } from '../../../v3/types';
import type { GestureType, HandlerCallbacks } from '../gesture';
export interface AttachedGestureState {
// Array of gestures that should be attached to the view under that gesture detector
attachedGestures: GestureType[];
// Event handler for the gesture, returned by `useEvent` from Reanimated
animatedEventHandler: unknown;
// Shared value that's responsible for transferring the callbacks to the UI thread handler
animatedHandlers: SharedValue<
HandlerCallbacks<Record<string, unknown>>[] | null
> | null;
// Whether `useAnimatedGesture` should be called inside detector
shouldUseReanimated: boolean;
// Whether the GestureDetector is mounted
isMounted: boolean;
}
export interface GestureDetectorState {
firstRender: boolean;
viewRef: React.Component | null;
previousViewTag: number;
forceRebuildReanimatedEvent: boolean;
}