diff --git a/apps/common-app/src/apps/reanimated/examples/AmountExample.tsx b/apps/common-app/src/apps/reanimated/examples/AmountExample.tsx index 498160dc2f64..ea64dce9ad22 100644 --- a/apps/common-app/src/apps/reanimated/examples/AmountExample.tsx +++ b/apps/common-app/src/apps/reanimated/examples/AmountExample.tsx @@ -1,14 +1,11 @@ import React, { useCallback } from 'react'; -import { Button, StyleSheet, TextInput, View } from 'react-native'; +import { Button, StyleSheet, View } from 'react-native'; import Animated, { useAnimatedProps, - useDerivedValue, useSharedValue, withTiming, } from 'react-native-reanimated'; -const AnimatedTextInput = Animated.createAnimatedComponent(TextInput); - const DELTAS = [-100, -10, -1, 1, 10, 100]; export default function AmountExample() { @@ -16,12 +13,8 @@ export default function AmountExample() { const sv = useSharedValue(ref.current); - const text = useDerivedValue(() => { - return `$${sv.value.toFixed(2)}`; - }); - const animatedProps = useAnimatedProps(() => { - return { text: text.value, defaultValue: text.value }; + return { text: `$${sv.value.toFixed(2)}` }; }); const setValue = useCallback( @@ -36,12 +29,7 @@ export default function AmountExample() { return ( - + {DELTAS.map((delta) => (