Closed danielCrespo01 closed 7 years ago
Hi @danielCrespo01 yes it's possible. You can see the code here:
https://github.com/machadogj/react-native-carousel-control/blob/master/index.js#L110
What you need to do is add a param to your callback:
_onChangeCorousel(index) { console.log("carousel index:", index); }
Let me know if that works for you.
thank you very much @machadogj
Welcome!
It is possible to obtain the index of the page with the function onPageChange this is my code:
_onChangeCorousel() { console.log("this Carousel:",this); }
<Carousel onPageChange={this._onChangeCorousel.bind(this)}>