Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Rushabhsinora opened this issue Sep 3, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Rushabhsinora
Copy link

Rushabhsinora commented Sep 3, 2022

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 (


<Animated.ScrollView
horizontal
snapToInterval={width}
decelerationRate="fast"
bounces={false}
showsHorizontalScrollIndicator={false}
>




</Animated.ScrollView>


<View
style={{
...StyleSheet.absoluteFillObject,
backgroundColor: "cyan",
}}
>
<View
style={{
flex: 1,
backgroundColor: "white",
borderTopLeftRadius: 75,
}}
>


);
}

The Error is showing that useValue is not function

Please Help

@Rushabhsinora Rushabhsinora added the bug Something isn't working label Sep 3, 2022
@hugoh59
Copy link

hugoh59 commented Dec 15, 2022

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

@mixmaker
Copy link

mixmaker commented Mar 8, 2023

Hi, did anyone get around with this?

@Haseeba393
Copy link

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

@lagoasoft-yagosantos
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants