I had replied with something similar on this thread,
Would that work for you ?
The functionality is pretty much what you require but visually it will be different, alternatively you can keep a counter in the state that increments when you click next and you can use that as page_number but I think above implementation is more straight forward.
Hope it helps !