Skip to content

Commit c3d9d8f

Browse files
author
Andrzej Antoni Kwaśniewski
committed
fix warning
1 parent e2c9322 commit c3d9d8f

5 files changed

Lines changed: 13 additions & 3 deletions

File tree

apps/common-app/src/common.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
} from 'react-native';
1717
import Animated, {
1818
Easing,
19-
runOnJS,
2019
useAnimatedStyle,
2120
useSharedValue,
2221
withTiming,
@@ -132,8 +131,7 @@ export const Feedback = ({ duration = 1000, ref }: FeedbackProps) => {
132131

133132
useImperativeHandle(ref, () => ({
134133
showMessage: (message: string) => {
135-
'worklet';
136-
runOnJS(displayMessage)(message);
134+
displayMessage(message);
137135
},
138136
}));
139137

apps/common-app/src/new_api/platform_specific/hover/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function useColoredHover(
4141
console.log('hover finalize', color);
4242
},
4343
effect: HoverEffect.LIFT,
44+
disableReanimated: true,
4445
});
4546

4647
return [gesture, style] as const;

apps/common-app/src/new_api/platform_specific/mouse_buttons/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export default function Buttons() {
5555
'worklet';
5656
feedbackRef.current?.showMessage('Tap with left');
5757
},
58+
disableReanimated: true,
5859
});
5960

6061
const middleTap = useTapGesture({
@@ -63,6 +64,7 @@ export default function Buttons() {
6364
'worklet';
6465
feedbackRef.current?.showMessage('Tap with middle');
6566
},
67+
disableReanimated: true,
6668
});
6769

6870
const rightTap = useTapGesture({
@@ -71,6 +73,7 @@ export default function Buttons() {
7173
'worklet';
7274
feedbackRef.current?.showMessage('Tap with right');
7375
},
76+
disableReanimated: true,
7477
});
7578

7679
const leftRightTap = useTapGesture({
@@ -79,6 +82,7 @@ export default function Buttons() {
7982
'worklet';
8083
feedbackRef.current?.showMessage('Tap with left | right');
8184
},
85+
disableReanimated: true,
8286
});
8387

8488
const allTap = useTapGesture({
@@ -87,6 +91,7 @@ export default function Buttons() {
8791
'worklet';
8892
feedbackRef.current?.showMessage('Tap with any button');
8993
},
94+
disableReanimated: true,
9095
});
9196

9297
const gestures = [leftTap, middleTap, rightTap, leftRightTap, allTap];

apps/common-app/src/new_api/showcase/nested_text/nested_text.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ function NativeDetectorExample() {
2020
'worklet';
2121
feedbackRef.current?.showMessage('Tapped on all text');
2222
},
23+
disableReanimated: true,
2324
});
2425

2526
const tapFirstPart = useTapGesture({
2627
onActivate: () => {
2728
'worklet';
2829
feedbackRef.current?.showMessage('Tapped on "try tapping on this part"');
2930
},
31+
disableReanimated: true,
3032
});
3133

3234
const tapSecondPart = useTapGesture({
@@ -35,6 +37,7 @@ function NativeDetectorExample() {
3537
console.log('Tapped on second part!');
3638
feedbackRef.current?.showMessage('Tapped on "or on this part"');
3739
},
40+
disableReanimated: true,
3841
});
3942

4043
return (

apps/common-app/src/new_api/showcase/svg/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,23 @@ export default function LogicDetectorExample() {
1616
'worklet';
1717
feedbackRef.current?.showMessage('Tapped circle!');
1818
},
19+
disableReanimated: true,
1920
});
2021

2122
const rectElementTap = useTapGesture({
2223
onActivate: () => {
2324
'worklet';
2425
feedbackRef.current?.showMessage('Tapped parallelogram!');
2526
},
27+
disableReanimated: true,
2628
});
2729

2830
const containerTap = useTapGesture({
2931
onActivate: () => {
3032
'worklet';
3133
feedbackRef.current?.showMessage('Tapped container!');
3234
},
35+
disableReanimated: true,
3336
});
3437

3538
// onPress must be set to enable gesture recognition on svg

0 commit comments

Comments
 (0)