diff --git a/website/versioned_docs/version-0.71/animations.md b/website/versioned_docs/version-0.71/animations.md index e66b7c0b568..4a9b8cdf232 100644 --- a/website/versioned_docs/version-0.71/animations.md +++ b/website/versioned_docs/version-0.71/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.72/animations.md b/website/versioned_docs/version-0.72/animations.md index 85f3d712a3b..f397663df24 100644 --- a/website/versioned_docs/version-0.72/animations.md +++ b/website/versioned_docs/version-0.72/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.73/animations.md b/website/versioned_docs/version-0.73/animations.md index 7065be643b9..e551ded1bdf 100644 --- a/website/versioned_docs/version-0.73/animations.md +++ b/website/versioned_docs/version-0.73/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.74/animations.md b/website/versioned_docs/version-0.74/animations.md index 552a62a6a82..af6923ada64 100644 --- a/website/versioned_docs/version-0.74/animations.md +++ b/website/versioned_docs/version-0.74/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.75/animations.md b/website/versioned_docs/version-0.75/animations.md index 552a62a6a82..af6923ada64 100644 --- a/website/versioned_docs/version-0.75/animations.md +++ b/website/versioned_docs/version-0.75/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.76/animations.md b/website/versioned_docs/version-0.76/animations.md index 4410f773bc5..5d4c9c6c459 100644 --- a/website/versioned_docs/version-0.76/animations.md +++ b/website/versioned_docs/version-0.76/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.77/animations.md b/website/versioned_docs/version-0.77/animations.md index d07e9c7bf8f..60193a47a9e 100644 --- a/website/versioned_docs/version-0.77/animations.md +++ b/website/versioned_docs/version-0.77/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.78/animations.md b/website/versioned_docs/version-0.78/animations.md index d07e9c7bf8f..60193a47a9e 100644 --- a/website/versioned_docs/version-0.78/animations.md +++ b/website/versioned_docs/version-0.78/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.79/animations.md b/website/versioned_docs/version-0.79/animations.md index d07e9c7bf8f..60193a47a9e 100644 --- a/website/versioned_docs/version-0.79/animations.md +++ b/website/versioned_docs/version-0.79/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, { diff --git a/website/versioned_docs/version-0.80/animations.md b/website/versioned_docs/version-0.80/animations.md index d07e9c7bf8f..60193a47a9e 100644 --- a/website/versioned_docs/version-0.80/animations.md +++ b/website/versioned_docs/version-0.80/animations.md @@ -74,15 +74,15 @@ export default () => { ```SnackPlayer ext=tsx -import React, {useEffect} from 'react'; -import {Animated, Text, View, useAnimatedValue} from 'react-native'; +import React, {useRef, useEffect} from 'react'; +import {Animated, Text, View} from 'react-native'; import type {PropsWithChildren} from 'react'; import type {ViewStyle} from 'react-native'; type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>; const FadeInView: React.FC = props => { - const fadeAnim = useAnimatedValue(0); // Initial value for opacity: 0 + const fadeAnim = useRef(new Animated.Value(0)).current // Initial value for opacity: 0 useEffect(() => { Animated.timing(fadeAnim, {