Automatic scrolling
To finish building this project, we're going to have to create a button that moves the slides whenever we press it. We already have the <Button />
component imported from 'galio-framework'
, so let's implement it underneath our <Paginator />
component:
As you can see, I've implemented Button
below <Paginator />
. I've added the same color our images and dots are and removed the shadow via the shadowless
prop. Now that we know that our function needs to be called whenever we press the button, we need to create a function and then link it to our onPress
prop.
But before we do that, we need to make sure we have anything in place for our button to work whenever we need it to.
First, we need to think about how we can get to the next slide without swiping through our list of slides. Well, we'll need a reference to...