Skip to content

Commit

Permalink
Fix ReanimatedSwipeable reanimated warnings (#3365)
Browse files Browse the repository at this point in the history
## Description

Fix - WARN [Reanimated] Reading from `value` during component render. in
react-native-gesture-handler version 2.22.1

This warning appear when you use Swipeable component.

Change : 
in src/components/ReanimatedSwipeable.tsx
replace rowWidth.value to rowWidth in the dependency array of
updateElementWidths callback.

#3170 #3320

## Test plan

Tested on Samsung Galaxy A52, android emulator and Iphone 13
  • Loading branch information
juliendevleeschauwer authored Jan 29, 2025
1 parent e30cc63 commit b3d8fd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ReanimatedSwipeable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
rightLayoutRef,
leftWidth,
rightWidth,
rowWidth.value,
rowWidth,
]);

const swipeableMethods = useMemo<SwipeableMethods>(
Expand Down

0 comments on commit b3d8fd9

Please sign in to comment.