Skip to content

Commit

Permalink
fix: missing .get() in useDerivedValue mock
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Dec 11, 2024
1 parent 16297eb commit dddff8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react-native-reanimated/src/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const hook = {
useAnimatedReaction: NOOP,
useAnimatedRef: () => ({ current: null }),
useAnimatedScrollHandler: NOOP_FACTORY,
useDerivedValue: <Value>(processor: () => Value) => ({ value: processor() }),
useDerivedValue: <Value>(processor: () => Value) => {
const result = processor();

return { value: result, get: () => result };
},
useAnimatedSensor: () => ({
sensor: {
value: {
Expand Down

0 comments on commit dddff8e

Please sign in to comment.