moschan / react-native-flip-card

The card component which has a motion of flip for React Native(iOS/Android)
MIT License
387 stars 112 forks source link

endless loop inside onFlipStart #63

Open newkolay opened 6 years ago

newkolay commented 6 years ago

Hello, help me please with the function onFlipStart, i don't understand the scenario when it could be implemented, because it seems it's not possible to call setState in it. (because of endless loop). I'm trying to hide the content of the card when the flip starts because my two sides have different heights.

hmost1 commented 5 years ago

I have't figured out why this happens, but to get around it I managed the "flip" parameter manually which seems to halt the infinite loop. E.g:

<FlipCard
          flip={this.state.clickedA}
          onFlipStart={this._flipClickedA}
  >
xumes commented 5 years ago

I am having this issue too and the workaround did not work for me. By the way, my FlipCard is inside a Swiper component.

pckz commented 4 years ago

hey @kolya3001 and @xumes how do you solve it? I have the same problem. Thanks

juliolena25 commented 3 years ago

Inside of library, on FlipCard.js, remove componentDidUpdate and it works properly, I'm gonna make a pull request for that