// useLibs // noPage import { useEffect, useRef } from 'react'; import { Text } from 'react-native'; import Animated, { useAnimatedStyle, useSharedValue, withDelay, withTiming } from 'react-native-reanimated'; const AnimatedText = Animated.createAnimatedComponent(Text) export default function useRenderCounter(module: string): any { const counter = useRef(1) const value = useSharedValue(0) useEffect(() => { counter.current += 1 value.value = 1 value.value = withDelay(1000, withTiming(0, { duration: 500 })) }) const style = useAnimatedStyle(() => ({ opacity: value.value })) return () => ( {module}: {counter.current} ) }