about summary refs log tree commit diff
path: root/src/components/Loader.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Loader.tsx')
-rw-r--r--src/components/Loader.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/Loader.tsx b/src/components/Loader.tsx
index e0b3be637..149554912 100644
--- a/src/components/Loader.tsx
+++ b/src/components/Loader.tsx
@@ -17,13 +17,12 @@ export function Loader(props: Props) {
   const rotation = useSharedValue(0)
 
   const animatedStyles = useAnimatedStyle(() => ({
-    transform: [{rotate: rotation.value + 'deg'}],
+    transform: [{rotate: rotation.get() + 'deg'}],
   }))
 
   React.useEffect(() => {
-    rotation.value = withRepeat(
-      withTiming(360, {duration: 500, easing: Easing.linear}),
-      -1,
+    rotation.set(() =>
+      withRepeat(withTiming(360, {duration: 500, easing: Easing.linear}), -1),
     )
   }, [rotation])