3DJakob / react-tinder-card-demo

This is a demo for react-tinder-card which is a react module for making elements behave like cards in the ever so popular dating app tinder.

Home Page:https://3djakob.github.io/react-tinder-card-demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remove card after leave screen

astronautfa opened this issue · comments

When the card leaves the screen it doesn't get removed
is there any way to remove or hide the element after it has left the screen?

Yes, this can be achieved in many ways. Here is 2 examples

  1. Removing the data to the corresponding card on the left screen.
  2. Have an array state with all hidden items and then add each item that leaves the screen. Finally in the render code set display: none on the cards included in the list.

However, the best thing is to keep them visible if you want to use the restore card function. Because otherwise, you won't be able to do that.