diff --git a/docs/ANIMATED.md b/docs/ANIMATED.md index 291aacf..071eb86 100644 --- a/docs/ANIMATED.md +++ b/docs/ANIMATED.md @@ -30,24 +30,24 @@ import Reanimated, { useAnimatedProps, useSharedValue, withSpring, -} from "react-native-reanimated"; +} from "react-native-reanimated" -const ReanimatedCamera = Reanimated.createAnimatedComponent(Camera); +const ReanimatedCamera = Reanimated.createAnimatedComponent(Camera) Reanimated.addWhitelistedNativeProps({ zoom: true, -}); +}) -export const App = () => { - const zoom = useSharedValue(0); +export function App() { + const zoom = useSharedValue(0) const onRandomZoomPress = useCallback(() => { - zoom.value = withSpring(Math.random()); - }, []); + zoom.value = withSpring(Math.random()) + }, []) const animatedProps = useAnimatedProps>( () => ({ zoom: zoom.value }), [zoom] - ); + ) return ( <>