File tree 2 files changed +13
-2
lines changed
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';
15
15
import { RotationGestureHandlerEventPayload } from '../RotationGestureHandler' ;
16
16
import { TapGestureHandlerEventPayload } from '../TapGestureHandler' ;
17
17
import { NativeViewGestureHandlerPayload } from '../NativeViewGestureHandler' ;
18
+ import { isRemoteDebuggingEnabled } from '../../utils' ;
18
19
19
20
export type GestureType =
20
21
| BaseGesture < Record < string , unknown > >
@@ -278,9 +279,13 @@ export abstract class BaseGesture<
278
279
prepare ( ) { }
279
280
280
281
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
282
285
return (
283
- this . config . runOnJS !== true && ! this . handlers . isWorklet . includes ( false )
286
+ this . config . runOnJS !== true &&
287
+ ! this . handlers . isWorklet . includes ( false ) &&
288
+ ! isRemoteDebuggingEnabled ( )
284
289
) ;
285
290
}
286
291
}
Original file line number Diff line number Diff line change @@ -44,3 +44,9 @@ export function isFabric(): boolean {
44
44
// @ts -expect-error nativeFabricUIManager is not yet included in the RN types
45
45
return ! ! global ?. nativeFabricUIManager ;
46
46
}
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