We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7eade7 commit 3eb80e4Copy full SHA for 3eb80e4
src/components/caret.tsx
@@ -1,10 +1,10 @@
1
-import { useEffect } from 'react';
2
-import { StyleSheet, Animated, useAnimatedValue } from 'react-native';
+import { useEffect, useRef } from 'react';
+import { StyleSheet, Animated } from 'react-native';
3
import { DEFAULT_DARK_COLOR } from '../constants';
4
import { useTextInputOTP } from '../hooks/use-text-input-otp';
5
6
export function Caret() {
7
- const opacity = useAnimatedValue(0);
+ const opacity = useRef(new Animated.Value(0)).current;
8
const { caretColor } = useTextInputOTP();
9
10
useEffect(() => {
0 commit comments