B
B
babcheg2020-05-11 15:54:28
React
babcheg, 2020-05-11 15:54:28

How to call the removeCard() method from the Cards.js file of the react-swipe-card library?

Using this library, you can create cards that can be swiped in different directions. When swiping far enough, the removeCard() method is called , which removes the card from the screen. I want to understand how to call this method and bind it to a button so that the card is removed from the screen when pressed. In this issue, user josephecombs explains how he was able to do this, but since I'm new to react, I'm having a hard time understanding its actions. Can someone explain his solution or offer his own? Thank you in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question