meteor-factory / react-native-tinder-swipe-cards

Tinder-like swipe cards for your React Native app
MIT License
1.13k stars 301 forks source link

Error while updateing property 'transform' of a view managed by:RCTView? #55

Closed PrincipalsOffice closed 7 years ago

PrincipalsOffice commented 7 years ago

I got this error when trying to use the sample code to swipe, the images are also nor displaying on my emulator, only a blank card?

Edit: It works on iOS. Edit2: Apparently the commit on Dec 20th, 2016 made it not working for me on Android (https://github.com/meteor-factory/react-native-tinder-swipe-cards/commit/580425d9ae42cdbd2cf83c70e535d4f896dc8ed9#diff-92a3834b964b25cc4dcba7a0d84e2b87). Everything works fine when I revert it back to the Nov 30th commit.

mihaben commented 7 years ago

Same problem here (Android), I coudn´t fix it reverting the commit, for me seems an important bug... 😞

siraj94farhan commented 7 years ago

In the line number 159, vx is sometimes returning 0 that results in undefined value of velocity. Handling that would fix the issue.

It tried this if (Math.abs(this.state.pan.x._value) > SWIPE_THRESHOLD && vx !== 0) condition with additional vx!==0

vitorebatista commented 7 years ago

@siraj94farhan could you create a PR ?

siraj94farhan commented 7 years ago

Sure @vitorebatista

vitorebatista commented 7 years ago

Thanks @siraj94farhan !