2

Is there a way to debug the current .value of a sharedValue, something like this?

const progress = useSharedValue(0);

<Animated.Code>
    {() => debug('progress: ', progress.value)}
</Animated.Code>
Chris
  • 1,829
  • 1
  • 15
  • 22

1 Answers1

1

You can use useDerivedValue for logging

import { useDerivedValue } from 'react-native-reanimated';

useDerivedValue(() => {
  console.log(progress.value);
});
Sedoyjan
  • 124
  • 2
  • 7