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

Add resetDeck method #102

Open
karladler opened this issue Nov 22, 2023 · 0 comments
Open

Add resetDeck method #102

karladler opened this issue Nov 22, 2023 · 0 comments

Comments

@karladler
Copy link

In order to reset all the internal state and start from index 0, I would like to have the internal initDeck method exposed, e.g. as a resetDeck method.

I think the following should be enough. Not sure though about any possible side effects here?

https://github.com/lhandel/react-native-card-stack-swiper/blob/5f99956b865eb0d5dd52d97378a54f98f65a547f/CardStack.js#L306C1-L306C1

  resetDeck() {
    this.initDeck();
  }
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

1 participant