MCPcopy Create free account
hub / github.com/code100x/mobile-magic / HelloWave

Function HelloWave

expo-base-app/components/HelloWave.tsx:13–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11import { ThemedText } from '@/components/ThemedText';
12
13export function HelloWave() {
14 const rotationAnimation = useSharedValue(0);
15
16 useEffect(() => {
17 rotationAnimation.value = withRepeat(
18 withSequence(withTiming(25, { duration: 150 }), withTiming(0, { duration: 150 })),
19 4 // Run the animation 4 times
20 );
21 }, []);
22
23 const animatedStyle = useAnimatedStyle(() => ({
24 transform: [{ rotate: `${rotationAnimation.value}deg` }],
25 }));
26
27 return (
28 <Animated.View style={animatedStyle}>
29 <ThemedText style={styles.text}>👋</ThemedText>
30 </Animated.View>
31 );
32}
33
34const styles = StyleSheet.create({
35 text: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected