react-native-animated-tabbar icon indicating copy to clipboard operation
react-native-animated-tabbar copied to clipboard

TypeError: (0, _reactNativeRedash.useValue) is not a function. (In '(0, _reactNativeRedash.useValue)(0)', '(0, _reactNativeRedash.useValue)' is undefined)

Open Rushabhsinora opened this issue 3 years ago • 4 comments

Error : TypeError: (0, _reactNativeRedash.useValue) is not a function. (In '(0, _reactNativeRedash.useValue)(0)', '(0, _reactNativeRedash.useValue)' is undefined)

In Package.json

"dependencies": { "@react-navigation/native": "^6.0.12", "@react-navigation/stack": "^6.2.3", "expo": "~46.0.9", "expo-font": "~10.2.0", "expo-splash-screen": "~0.16.2", "expo-status-bar": "~1.4.0", "react": "18.0.0", "react-native": "0.69.5", "react-native-gesture-handler": "~2.5.0", "react-native-reanimated": "~2.9.1", "react-native-redash": "^18.0.0", "react-native-safe-area-context": "4.3.1", "react-native-screens": "~3.15.0" },

In index.js

import { View, Text, StyleSheet, Dimensions } from "react-native"; import React from "react"; import { useValue } from "react-native-redash"; import Slide, { SLIDER_HEIGHT } from "./Slide"; import Animated from "react-native-reanimated";

const { width, height } = Dimensions.get("window");

export default function Onboarding() { const x = useValue(0);

return ( <View style={styles.container}> <View style={styles.slider}> <Animated.ScrollView horizontal snapToInterval={width} decelerationRate="fast" bounces={false} showsHorizontalScrollIndicator={false} > <Slide label="Relaxed" /> <Slide label="PlayFul" right="true" /> <Slide label="Excentric" /> <Slide label="Funky" right="true" /> </Animated.ScrollView> </View> <View style={styles.footer}> <View style={{ ...StyleSheet.absoluteFillObject, backgroundColor: "cyan", }} ></View> <View style={{ flex: 1, backgroundColor: "white", borderTopLeftRadius: 75, }} ></View> </View> </View> ); }

The Error is showing that useValue is not function

Please Help

Rushabhsinora avatar Sep 03 '22 12:09 Rushabhsinora

Getting same issue for weeks could not find a solution, any help @gorhom ?

hugoh59 avatar Dec 15 '22 16:12 hugoh59

Hi, did anyone get around with this?

mixmaker avatar Mar 08 '23 11:03 mixmaker

I'm also getting issue: useValue() accessing an undefined value

Haseeba393 avatar Oct 12 '23 11:10 Haseeba393

Probably you are using a newer version of react-native-reanimated, and Redash does not support useValue anymore, stuck with this problem, I tried to rewrite the components updating code usage, but this generated new problems and took more time than I had to invest in, it's a shame because this component was very useful. *could still working with animated v1, but expo doesn't, so maybe there is a way to run in compatibility mode or something, but i don't if worth it

lagoasoft-yagosantos avatar Mar 04 '24 15:03 lagoasoft-yagosantos