Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to refresh particular card? #93

Open
mitesh-db opened this issue Dec 10, 2021 · 3 comments
Open

How to refresh particular card? #93

mitesh-db opened this issue Dec 10, 2021 · 3 comments

Comments

@mitesh-db
Copy link

Hey @lhandel , Great work by you in this package, I really appreciate your effort.

Does anyone know how can I refresh only a single card somehow?

Thanks in advance!

@sanketk478
Copy link

same issue..

@artfxx
Copy link

artfxx commented Apr 30, 2022

const [cards, setCards] = useState([
{ key: 0, text: 'test' },
{ key: 1, text: 'test' },
{ key: 2, text: 'test' },
]);

return (

<CardStack
style={styles.cardStack}
renderNoMoreCards={() => (
<Text
style={{
fontWeight: '700',
fontSize: 18,
color: 'gray',
}}
>
No more cards :(

)}
ref={swiperRef}
>
{cards.map((card, index) => {
return (

{card.text}
<Button
title='button'
onPress={() => {
setCards((prev) =>
prev.map((card) => {
if (card.key === index) {
card.text = 'updated';
}
return card;
})
);
}}
/>

);
})}
</CardStack>

);

@artfxx
Copy link

artfxx commented Jul 21, 2022

carbon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants