From 58c35595ccdaceebcab5cad4649971ea4631eb47 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Tue, 8 Jul 2025 16:17:11 +0200 Subject: [PATCH] Migrate from `useWorkletCallback` --- src/App.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index ab853de..99f4c4d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -17,7 +17,6 @@ import Reanimated, { useAnimatedStyle, useDerivedValue, useSharedValue, - useWorkletCallback, withSpring, } from 'react-native-reanimated'; import ColorTile from './components/ColorTile'; @@ -157,11 +156,13 @@ export function App() { [isHolding], ); - const onTapBegin = useWorkletCallback(() => { + const onTapBegin = useCallback(() => { + 'worklet'; isHolding.value = true; runOnJS(hapticFeedback)('selection'); }, [isHolding]); - const onTapEnd = useWorkletCallback(() => { + const onTapEnd = useCallback(() => { + 'worklet'; isHolding.value = false; }, [isHolding]);