From 8bbe9f99a5313434592e2e1d3767c83a63fa7f6b Mon Sep 17 00:00:00 2001 From: Mohsen Date: Tue, 26 Mar 2024 12:12:36 +0300 Subject: [PATCH] [#19351] fix: use animation worklet --- src/js/worklets/profile_header.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/worklets/profile_header.js b/src/js/worklets/profile_header.js index c6c8980e0fc0..f26ee2769063 100644 --- a/src/js/worklets/profile_header.js +++ b/src/js/worklets/profile_header.js @@ -2,6 +2,7 @@ import { useAnimatedStyle, withTiming } from 'react-native-reanimated'; export function profileHeaderAnimation(scrollY, threshold, topBarHeight) { return useAnimatedStyle(() => { + 'worklet'; const opacity = scrollY.value < threshold ? withTiming(0) : withTiming(1); const translateY = scrollY.value < threshold ? withTiming(topBarHeight) : withTiming(0);