Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native: Exception thrown while executing UI block

Tags:

I'm building an iOS react-native app, and I'm currently using the react-native-swipe-card package to build "tinder" like swipe cards for my app. The app works fine however when I go to swipe a card left or right, and let it go while it's halfway off the screen I'm getting the following error:

ExceptionsManager.js:71 Exception thrown while executing UI block: -[NSNull floatValue]: unrecognized selector sent to instance 0x1075b5130

enter image description here

like image 861
Onaracs Avatar asked May 06 '17 16:05

Onaracs


1 Answers

As @Peuchele commented, I was getting this same error, and the reason it was happening was because I passed a value into an Animated View that was undefined.

So, to clarify, make sure any values you pass into a component using an Animated.Value is not undefined.

The specific code I found at fault was:

const { value } = props;  this.state = {   translateYValue: new Animated.Value(value), }; 

And props.value was undefined.

like image 86
Doug Watkins Avatar answered Sep 25 '22 15:09

Doug Watkins