Don't pass dependencies to Reanimated hooks on native (#4472)
## Description Since Reanimated 4.6 (software-mansion/react-native-reanimated#10009) the native implementations of `useAnimatedStyle`, `useDerivedValue` and other hooks log a dev warning whenever a dependencies argument is passed, since dependencies are only relevant on web: ``` WARN [Reanimated] dependencies should only be used in web implementation. ``` We pass dependencies in two places: - `ReanimatedSwipeable` passes `[appliedTranslation, rowState]` to `useAnimatedStyle`. The dependencies are still needed on web, where bundlers resolve the compiled `lib` output that isn't processed by the Reanimated babel plugin, so they are now passed only when `Platform.OS === 'web'`. - `ReanimatedDrawerLayout` passed an empty array to `useDerivedValue`. An empty array does nothing on any platform (the web fallback only reads non-empty dependencies), so it's simply removed. ## Test plan - Open the Swipeable and Drawer examples in the example app on native and check that the warning is no longer logged. - Check that Swipeable still animates correctly in the example app running on web.
M
Michał Bert committed
7e1de71c2f9f53daabb226a8adccd4e0c9609b90
Parent: 80cfa6f
Committed by GitHub <noreply@github.com>
on 8/26/2026, 9:31:05 AM