mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[Video] `withRepeat` for spinner (#5141)

authored by hailey.at and committed by

GitHub 12b4a250 45bb2477

+8 -4
+8 -4
src/view/com/composer/Composer.tsx
··· 27 27 useAnimatedStyle, 28 28 useDerivedValue, 29 29 useSharedValue, 30 + withRepeat, 30 31 withTiming, 31 32 } from 'react-native-reanimated' 32 33 import {useSafeAreaInsets} from 'react-native-safe-area-context' ··· 1089 1090 1090 1091 const rotate = useDerivedValue(() => { 1091 1092 if (progress === 0 || progress >= 0.99) { 1092 - return withTiming(360, { 1093 - duration: 2500, 1094 - easing: Easing.out(Easing.cubic), 1095 - }) 1093 + return withRepeat( 1094 + withTiming(360, { 1095 + duration: 2500, 1096 + easing: Easing.out(Easing.cubic), 1097 + }), 1098 + -1, 1099 + ) 1096 1100 } 1097 1101 return 0 1098 1102 })