lhandel / react-native-card-flip

Card flip animation for React Native
MIT License
252 stars 61 forks source link

ReferenceError: bYRotation is not defined #22

Closed AmmarKhalid123 closed 4 years ago

AmmarKhalid123 commented 4 years ago

I need this npm module in a project and just tried it before using by copying the code provided in the example, my App.js is simple and looks like this: `import React from 'react'; import { StyleSheet, Text, View, TouchableOpacity } from 'react-native'; import CardFlip from 'react-native-card-flip';

export default class App extends React.Component { render() { return (

this.card = card} > this.card.flip()} >AB this.card.flip()} >CD
);

} }

const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, }); `

But on simulator it gives the following error: ReferenceError: bYRotation is not defined

and it marks the following lines: ` }); 262 | } else { 263 | // cardB Y-rotation

264 | bYRotation = rotation.y.interpolate({ | ^ 265 | inputRange: [0, 50, 100, 150], 266 | outputRange: ["0deg", "-180deg", "0deg", "180deg"], 267 | extrapolate: "clamp"`

I am guessing it's some issues with the this module.

niiashikwei commented 4 years ago

I'm having the same issue