Skip to content

Add resetDeck method #102

@karladler

Description

@karladler

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();
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions