lhandel/react-native-card-flip

ReferenceError: bYRotation is not defined

Closed this issue · 1 comments

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 (

<CardFlip style={styles.cardContainer} ref={(card) => this.card = card} >
<TouchableOpacity style={styles.card} onPress={() => this.card.flip()} >AB
<TouchableOpacity style={styles.card} onPress={() => 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.

I'm having the same issue