How do I use useSprings with a dynamic items array? #2197
Unanswered
juniorforlife
asked this question in
Support
Replies: 1 comment
-
In your case, i would put the spring on the component of the card itself? The setState callback can be passed to the children. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to implement something like the cards stack example
But instead of having a fixed array of items, it's a state. Whenever a card is swiped off, I will set state to remove that card from the array.
Further more, I want to implement lazy loading where I only show 10 cards, then load 10 more as users reaches the end.
How do I achieve this with
useSprings
? DoesuseSprings
know the array has changed and create new springs value accordingly?Beta Was this translation helpful? Give feedback.
All reactions