File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { PinchGestureHandlerEventPayload } from '../PinchGestureHandler';
1515import { RotationGestureHandlerEventPayload } from '../RotationGestureHandler' ;
1616import { TapGestureHandlerEventPayload } from '../TapGestureHandler' ;
1717import { NativeViewGestureHandlerPayload } from '../NativeViewGestureHandler' ;
18+ import { isRemoteDebuggingEnabled } from '../../utils' ;
1819
1920export type GestureType =
2021 | BaseGesture < Record < string , unknown > >
@@ -278,9 +279,13 @@ export abstract class BaseGesture<
278279 prepare ( ) { }
279280
280281 get shouldUseReanimated ( ) : boolean {
281- // use Reanimated when runOnJS isn't set explicitly and all defined callbacks are worklets
282+ // use Reanimated when runOnJS isn't set explicitly,
283+ // and all defined callbacks are worklets,
284+ // and remote debugging is disabled
282285 return (
283- this . config . runOnJS !== true && ! this . handlers . isWorklet . includes ( false )
286+ this . config . runOnJS !== true &&
287+ ! this . handlers . isWorklet . includes ( false ) &&
288+ ! isRemoteDebuggingEnabled ( )
284289 ) ;
285290 }
286291}
Original file line number Diff line number Diff line change @@ -44,3 +44,9 @@ export function isFabric(): boolean {
4444 // @ts -expect-error nativeFabricUIManager is not yet included in the RN types
4545 return ! ! global ?. nativeFabricUIManager ;
4646}
47+
48+ export function isRemoteDebuggingEnabled ( ) : boolean {
49+ // react-native-reanimated checks if in remote debugging in the same way
50+ // @ts -ignore global is available but node types are not included
51+ return ! ( global as any ) . nativeCallSyncHook || ( global as any ) . __REMOTEDEV__ ;
52+ }
You can’t perform that action at this time.
0 commit comments