From 28f508dcab38296c40a7f9f43f4a9d2f36d8d98e Mon Sep 17 00:00:00 2001 From: Guilherme Holm Date: Tue, 9 Jun 2026 10:45:30 -0300 Subject: [PATCH] fix(animation): replace useAnimatedValue with Animated.Value to fix runtime error Removed `useAnimatedValue` import from `react-native` and replaced `useAnimatedValue(0)` with `new Animated.Value(0)`. Reason: `useAnimatedValue` is not available in the current React Native version, causing the runtime error: TypeError: (0, _reactNative.useAnimatedValue) is not a function Using `Animated.Value` restores compatibility with the Animated API and keeps the fade animation working correctly. --- website/versioned_docs/version-0.85/animated.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/versioned_docs/version-0.85/animated.md b/website/versioned_docs/version-0.85/animated.md index fce79ffaf57..3a479163c59 100644 --- a/website/versioned_docs/version-0.85/animated.md +++ b/website/versioned_docs/version-0.85/animated.md @@ -23,12 +23,11 @@ import { View, StyleSheet, Button, - useAnimatedValue, } from 'react-native'; const App = () => { // fadeAnim will be used as the value for opacity. Initial Value: 0 - const fadeAnim = useAnimatedValue(0); + const fadeAnim = new Animated.Value(0); const fadeIn = () => { // Will change fadeAnim value to 1 in 5 seconds