Skip to content

Commit bb2e1d4

Browse files
committed
fix: remove non-worklet fallback
1 parent 0c4a8d7 commit bb2e1d4

File tree

1 file changed

+0
-13
lines changed
  • src/hooks/useAnimatedHighlightStyle

1 file changed

+0
-13
lines changed

src/hooks/useAnimatedHighlightStyle/index.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,6 @@ export default function useAnimatedHighlightStyle({
6868
const highlightBackgroundStyle = useAnimatedStyle(() => {
6969
'worklet';
7070

71-
// This code runs both on the JS thread (once for setup) and on the UI thread (for actual animation).
72-
// To avoid accessing Reanimated shared values (like .value) on the JS thread,
73-
// we guard the JS execution path with `_WORKLET`. This ensures we return a safe fallback style
74-
// during the JS pass and avoid any crashes or unexpected behavior.
75-
if (!_WORKLET) {
76-
return {
77-
backgroundColor: backgroundColor ?? theme.appBG,
78-
height: height ?? 'auto',
79-
opacity: 0,
80-
borderRadius,
81-
};
82-
}
83-
8471
const repeatableValue = repeatableProgress.get();
8572
const nonRepeatableValue = nonRepeatableProgress.get();
8673

0 commit comments

Comments
 (0)