Thank you for the major upgrade !
I saw that using a single card on a flatList is now possible on your readme but I don't see any example.
I think we must use SwiperCard and use it as a item on the flatList but this component can't be imported on my project, it seems that this element is missing an export.
When I add FlatList, pinar, any images carousel with direction horizontal inside renderCard then swiper is too laggy.
I'm rendering 20 cards and its sometimes stuck in 10th card in SUMSUNG S23 Ultra
Please, can you add the amount of the swipe to the onSwipeActive event? I would like to add an animation that is played based on the swipe but at the moment I have not found any way to derive this value.
First of all, thank you so much for your library and amazing work behind it!
I have a question about typescript issue I get after upgrading to v2.0.2 (might be unrelated, but worth to mention). I migrated the code to Swiper and now type check fails with this error:
error TS2786: 'Swiper' cannot be used as a JSX component.
Its return type 'ReactNode' is not a valid JSX element.
Type 'undefined' is not assignable to type 'Element | null'.
140 <Swiper
~~~~~~
As I understand, since Swiper's type might be undefined, it's incompatible with expected by JSX 'Element | null' type
Hello. I tried following the example in the repo . I used useState to store data and changed onSwipedRight and onSwipedLeft callbacks to update the state. The view gets re-rendered but it's empty
Here's my code
Our users don't instinctively understand that the the cards can be swiped upon app launch. Could we implement a sort of "demo" card swipe animation for the component, indicating the swipe gesture?
I have just updated to 2.0.2 as I have realized that there is a memory leak in the previous version ("rn-tinder-card": "1.6.0",), even if manually calling gc.
However, it seems to me 2.0.2 also does have this problem. When looking at the demo mp4 in the README: it starts from 209MB and after 30 sec it has 214MB. The problematic thing is that using swipeBack and any swipe again clearly leads to more and more memory too.
@Skipperlla
Any ideas where to start? I'd like to help with this as I need functionality provided by this lib asap. :)
Hi!
I have a problem with passing the updated data array when re-entering the screen where I use your list. Being on screen 1, I click on the second photo, move to screen 2 where I use your list, click the heart to change the attribute in the data array on screen 1 using Redux, go back to screen 1, and see the heart on the second photo. When I want to view this photo again, I click on it to go back to screen 2, and a Reanimated library error pops up. I suspect that the list keeps certain values that do not reset. Sometimes an error with the description appears - [Reanimated] Tried to modify key ${key} of an object which has been already passed to a worklet. See https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-modify-key-of-an-object-which-has-been-converted-to-a-shareable
for more details.[
Im trying to identify a way to cycle through all the items and then to cycle back to the beginning. Im happy to make the change and PR it in but cant quite work out where to start with it
Thanks for awesome library.
I just ran your example and run it on web npx expo start --web.
However, the card item still appears after swiping down, and it makes the parent height change.
i tested on ios, it works fine on ios simulator
But on android the card doesn't move when i touch and drag it, the card only moves when i press the button(like the heart button)
Do you know what the problem is?
Just wondering if you've encountered the following problem while you were migrating to v2: from Reanimated 2.14 to Reanimated 3. My issue is that after updating to Reanimated 3, if I use your lib on 1.x there is a little bit of flickering / lagging (with 10-20% chance) when I start to drag a card. The whole card jumps from the current dragged position back to a couple of millisec before and then back to the recent/valid dragged position, then continous its journey properly...
This is 100% due to the reason I updated to Reanimated 3 (to get rid of useAnimatedStyle which caused memory leak), I made no other changes. I also tried to update react-native-gesture-handler and mimic your recent code from v2, but this flickering / lagging is still there.
Have you run into that issue? I am just wondering how can I solve that without restructuring my codebase to be able to use v2 if that's possible.