()
| 2 | import { Animated, Button } from 'react-native' |
| 3 | |
| 4 | export default function MyComponent() { |
| 5 | const value = useRef(new Animated.Value(0)) |
| 6 | |
| 7 | return ( |
| 8 | <> |
| 9 | <Button |
| 10 | title="Animate" |
| 11 | onPress={() => { |
| 12 | const animation = Animated.timing(value.current, { |
| 13 | toValue: 1, |
| 14 | useNativeDriver: true, |
| 15 | }) |
| 16 | |
| 17 | animation.start() |
| 18 | }} |
| 19 | /> |
| 20 | <Animated.Text style={{ opacity: value.current, fontSize: 42 }}> |
| 21 | Hello! |
| 22 | </Animated.Text> |
| 23 | </> |
| 24 | ) |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected