Questions tagged [react-native-reanimated]

469 questions
3
votes
1 answer

Error in Reanimated "tried to synchronously call function res from a different thread "

Have some gesture handlers that work fine in the browser but I am getting this error on iOS in my onEnd callback in the useAnimatedGestureHandler hook. Here is all the code related to the gesture I am trying to add const headerHeight =…
3
votes
0 answers

React Native Reanimated + SVG + Custom Component Not Animating

I am trying to create a custom svg component (a rocket) that I then turn into an animated component using reanimated, so that I can move the rocket across the screen! Rocket: Rocket: class extends React.Component { render() { …
3
votes
1 answer

react-native-reanimated 2: cannot make a function with 'worklet' keyword (undefined is not a function)

im just learning react-native-reanimated v2, but i got an issue when creating a function with 'worklet' keyword. I installed react-native-reanimated v2 on a React Native bare project using npx react-native init myApp. I have followed all the…
3
votes
1 answer

How to use diffClamp in reanimated 2?

I am trying to hide and show the header based on the scroll event from reanimated 2 useAnimatedScrollHandler and I need to use the diffClamp so whenever the user scrolls up the header should be shown in less time than the whole scroll event…
3
votes
6 answers

React Native reanimated doesn't work with interpolate

I try to use Animated.interpolate but I get a strange error that I've never had. How can it be solved ? Thanks
Vlad Ghetina
  • 61
  • 2
  • 6
3
votes
0 answers

React native reanimated v2 Scale + Opacity withRepeat

I am trying to implement scaling View with Opacity togather through React native reanimated v2, but not able to contol withRepeat ... Below code is just Perform scaling withRepeat but not Opacity. How to control Opacity + Scaling of view withRepeat…
3
votes
1 answer

React native how to test animations with Jest

I'm trying to write tests for animation that I did with 'react-native-reanimated'. When the page is loading for the first time the animation is running for 3 sec, so I'm wondering how can I test it. I thought about taking a snapshot at the start of…
3
votes
1 answer

useValues is not a function, react-native-redash

After upgrading react-native-redash from 9.6.0 to 15.11.1, I can't find useValues anymore. Has it been removed? Is there a new preferred way to get animated values?
3
votes
1 answer

How to make scroll view scroollabe inside panGestureHandler?

I am using a react-native-gesture-handler library with reanimated and react-native-redash. I want to make scrollView scrollable which is nested inside panGestureHandler but all the interactions are handled by panGestureHandler, so scrollView is not…
3
votes
1 answer

React Native Project Android Gradle Fail (React-Native-Reanimated Fail)

I was in the middle of coding an app using VS Code and react-native and after trying to install react-native-material-ripple I ran into the following error trying to build my…
3
votes
4 answers

React Native / react-native-reanimated-bottom-sheet / How can I change the background color of the view behind the sheet?

In the demo, the last two examples have a dark background, but I don't see a way to change it from transparent to dark, and I see nothing in the source code related to style or color. Any advice?
Mohammed Ibrahim
  • 418
  • 4
  • 11
3
votes
4 answers

Build failed 'A problem occurred configuring project ':react-native-reanimated'. in React native project

I am trying to run project with command, npx react-native run-android and found this as an error: FAILURE: Build failed with an exception. Where: Build file…
Swift
  • 829
  • 2
  • 12
  • 33
3
votes
0 answers

Reanimated v1 animate a value from 1 to 0 to 1 again

I try to build a sequence animation where I animate a value (with timing) from 1 to 0, and then back again to 1. I am trying to build this using react native reanimated v1 and react-native-redash. My animation code roughly looks like this: import {…
hannojg
  • 983
  • 8
  • 28
3
votes
4 answers

react-native-reanimated not accepting rotation value in degrees

I'm learning reanimated because it works on the UI thread and I want to achieve a rotation animation. Rotating in degrees (like 45deg) is not working and prompts an error. So how can we achieve rotation animation in react-native-reanimation…
viki
  • 57
  • 1
  • 2
3
votes
2 answers

React Native : Bad performance animating the height of a view using react-native-reanimated

Animating the height of a view when scrolling through a list is very slow and choppy, it's work fine for IOS, but not for Android : import * as React from "react"; import { StyleSheet, Text } from "react-native"; import Animated from…
AHmedRef
  • 2,555
  • 12
  • 43
  • 75