円を表示する
react-native-svgライブラリを合わせて使用します。
App.js
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import Animated, { useSharedValue } from 'react-native-reanimated';
const AnimatedCircle = Animated.createAnimatedComponent(Circle);
export default function App() {
const r = useSharedValue(10);
return (
<View style={styles.container}>
<AnimatedCircle cx="50" cy="50" r={r} fill="blue"/>
</View>
);
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});