Closed rohitpaniker closed 4 years ago
I have resolved this bug.
Go to: /node_modules/react-native-flip-card/lib/FlipCard.js
MAKE CHANGES FROM:
componentWillReceiveProps (nextProps) { if (this.state.isFlipped !== nextProps.flip) { this._toggleCard() } }
TO:
componentWillReceiveProps (nextProps) { // if (this.state.isFlipped !== nextProps.flip) { // this._toggleCard() // } }
I have the below code:
<FlipCard flip={false} friction={20} perspective={1000} flipHorizontal={false} flipVertical={true} clickable={true}
handleCT = (v) => this.setState({ value: v })
So when I click a button inside and do a setState({ }); the card flips back to original position (flips back and shows content of ) rather than retaining current positions.
Please help me solve this bug