score:3

Accepted answer

please add a reference to your deck component like below

<deck ref={(deck) => {this.deck = deck; }} transition={["zoom", "slide"]} transitionduration={500} theme={theme}>
  ...
</deck>

now you have a property by the name of deck in your component. use componentdidmount lifecycle method to retrieve this.deck.props.children.length and assign it to window.slidecount.

componentdidmount() {
  window.slidecount = this.deck.props.children.length
}

now open browser console and type slidecount, you will se you have slide count displayed there. after that you can use following to change the slides

window.location = "#/1"

score:0

from the docs,

the gotoaction tag lets you jump to another slide in your deck. the gotoaction can be used a simple button that supports base styling or accept a render prop with a callback to support custom components

the following code will render a button that will jump to a specific slide in your deck.

<gotoaction slide={3}>jump to 3</gotoaction>

Related Query

More Query from same tag